aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_ip4_vrf_multi_instance.py4
-rw-r--r--test/test_ip6_vrf_multi_instance.py4
-rw-r--r--test/test_nat44_ed.py10
-rw-r--r--test/test_nat44_ei.py20
-rw-r--r--test/test_nat64.py2
-rw-r--r--test/vm_vpp_interfaces.py10
-rw-r--r--test/vpp_ip_route.py10
7 files changed, 34 insertions, 26 deletions
diff --git a/test/test_ip4_vrf_multi_instance.py b/test/test_ip4_vrf_multi_instance.py
index cbda790637b..318a4a81f44 100644
--- a/test/test_ip4_vrf_multi_instance.py
+++ b/test/test_ip4_vrf_multi_instance.py
@@ -195,7 +195,7 @@ class TestIp4VrfMultiInst(VppTestCase):
for i in range(count):
vrf_id = i + start
- self.vapi.ip_table_add_del(is_add=1, table={"table_id": vrf_id})
+ self.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": vrf_id})
self.logger.info("IPv4 VRF ID %d created" % vrf_id)
if vrf_id not in self.vrf_list:
self.vrf_list.append(vrf_id)
@@ -249,7 +249,7 @@ class TestIp4VrfMultiInst(VppTestCase):
self.logger.info("IPv4 VRF ID %d reset finished" % vrf_id)
self.logger.debug(self.vapi.ppcli("show ip fib"))
self.logger.debug(self.vapi.ppcli("show ip neighbors"))
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": vrf_id})
+ self.vapi.ip_table_add_del_v2(is_add=0, table={"table_id": vrf_id})
def create_stream(self, src_if, packet_sizes):
"""
diff --git a/test/test_ip6_vrf_multi_instance.py b/test/test_ip6_vrf_multi_instance.py
index da3de8e6100..26519b129cf 100644
--- a/test/test_ip6_vrf_multi_instance.py
+++ b/test/test_ip6_vrf_multi_instance.py
@@ -213,7 +213,7 @@ class TestIP6VrfMultiInst(VppTestCase):
"""
for i in range(count):
vrf_id = i + start
- self.vapi.ip_table_add_del(
+ self.vapi.ip_table_add_del_v2(
is_add=1, table={"table_id": vrf_id, "is_ip6": 1}
)
self.logger.info("IPv6 VRF ID %d created" % vrf_id)
@@ -276,7 +276,7 @@ class TestIP6VrfMultiInst(VppTestCase):
self.vrf_list.remove(vrf_id)
if vrf_id in self.vrf_reset_list:
self.vrf_reset_list.remove(vrf_id)
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": vrf_id, "is_ip6": 1})
+ self.vapi.ip_table_add_del_v2(is_add=0, table={"table_id": vrf_id, "is_ip6": 1})
def create_stream(self, src_if, packet_sizes):
"""
diff --git a/test/test_nat44_ed.py b/test/test_nat44_ed.py
index d3d6d07457b..6eb4c665c58 100644
--- a/test/test_nat44_ed.py
+++ b/test/test_nat44_ed.py
@@ -90,7 +90,7 @@ class TestNAT44ED(VppTestCase):
@classmethod
def create_and_add_ip4_table(cls, i, table_id=0):
- cls.vapi.ip_table_add_del(is_add=1, table={"table_id": table_id})
+ cls.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": table_id})
i.set_table_ip4(table_id)
@classmethod
@@ -172,7 +172,7 @@ class TestNAT44ED(VppTestCase):
cls.configure_ip4_interface(i, hosts=3)
# test specific (test-multiple-vrf)
- cls.vapi.ip_table_add_del(is_add=1, table={"table_id": 1})
+ cls.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": 1})
# test specific (test-one-armed-nat44-static)
cls.pg4.generate_remote_hosts(2)
@@ -4397,8 +4397,8 @@ class TestNAT44EDMW(TestNAT44ED):
self.pg7.unconfig()
self.pg8.unconfig()
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": vrf_id_in})
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": vrf_id_out})
+ self.vapi.ip_table_add_del_v2(is_add=0, table={"table_id": vrf_id_in})
+ self.vapi.ip_table_add_del_v2(is_add=0, table={"table_id": vrf_id_out})
def test_dynamic_output_feature_vrf(self):
"""NAT44ED dynamic translation test: output-feature, VRF"""
@@ -4467,7 +4467,7 @@ class TestNAT44EDMW(TestNAT44ED):
self.pg7.unconfig()
self.pg8.unconfig()
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": new_vrf_id})
+ self.vapi.ip_table_add_del_v2(is_add=0, table={"table_id": new_vrf_id})
def test_next_src_nat(self):
"""NAT44ED On way back forward packet to nat44-in2out node."""
diff --git a/test/test_nat44_ei.py b/test/test_nat44_ei.py
index ae9194b87ce..4748744ea6a 100644
--- a/test/test_nat44_ei.py
+++ b/test/test_nat44_ei.py
@@ -953,8 +953,8 @@ class TestNAT44EI(MethodHolder):
cls.pg1.configure_ipv4_neighbors()
cls.overlapping_interfaces = list(list(cls.pg_interfaces[4:7]))
- cls.vapi.ip_table_add_del(is_add=1, table={"table_id": 10})
- cls.vapi.ip_table_add_del(is_add=1, table={"table_id": 20})
+ cls.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": 10})
+ cls.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": 20})
cls.pg4._local_ip4 = "172.16.255.1"
cls.pg4._remote_hosts[0]._ip4 = "172.16.255.2"
@@ -2682,8 +2682,8 @@ class TestNAT44EI(MethodHolder):
self.pg0.unconfig_ip4()
self.pg1.unconfig_ip4()
- self.vapi.ip_table_add_del(is_add=1, table={"table_id": vrf_id1})
- self.vapi.ip_table_add_del(is_add=1, table={"table_id": vrf_id2})
+ self.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": vrf_id1})
+ self.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": vrf_id2})
self.pg0.set_table_ip4(vrf_id1)
self.pg1.set_table_ip4(vrf_id2)
self.pg0.config_ip4()
@@ -2730,8 +2730,8 @@ class TestNAT44EI(MethodHolder):
self.pg1.config_ip4()
self.pg0.resolve_arp()
self.pg1.resolve_arp()
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": vrf_id1})
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": vrf_id2})
+ self.vapi.ip_table_add_del_v2(is_add=0, table={"table_id": vrf_id1})
+ self.vapi.ip_table_add_del_v2(is_add=0, table={"table_id": vrf_id2})
def test_vrf_feature_independent(self):
"""NAT44EI tenant VRF independent address pool mode"""
@@ -3468,8 +3468,8 @@ class TestNAT44EI(MethodHolder):
self.pg1.unconfig_ip4()
self.pg2.unconfig_ip4()
- self.vapi.ip_table_add_del(is_add=1, table={"table_id": vrf_id1})
- self.vapi.ip_table_add_del(is_add=1, table={"table_id": vrf_id2})
+ self.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": vrf_id1})
+ self.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": vrf_id2})
self.pg1.set_table_ip4(vrf_id1)
self.pg2.set_table_ip4(vrf_id2)
self.pg1.config_ip4()
@@ -4302,8 +4302,8 @@ class TestNAT44EIMW(MethodHolder):
cls.pg1.configure_ipv4_neighbors()
cls.overlapping_interfaces = list(list(cls.pg_interfaces[4:7]))
- cls.vapi.ip_table_add_del(is_add=1, table={"table_id": 10})
- cls.vapi.ip_table_add_del(is_add=1, table={"table_id": 20})
+ cls.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": 10})
+ cls.vapi.ip_table_add_del_v2(is_add=1, table={"table_id": 20})
cls.pg4._local_ip4 = "172.16.255.1"
cls.pg4._remote_hosts[0]._ip4 = "172.16.255.2"
diff --git a/test/test_nat64.py b/test/test_nat64.py
index 7333181e7f0..c3279655420 100644
--- a/test/test_nat64.py
+++ b/test/test_nat64.py
@@ -74,7 +74,7 @@ class TestNAT64(VppTestCase):
cls.ip6_interfaces.append(cls.pg_interfaces[2])
cls.ip4_interfaces = list(cls.pg_interfaces[1:2])
- cls.vapi.ip_table_add_del(
+ cls.vapi.ip_table_add_del_v2(
is_add=1, table={"table_id": cls.vrf1_id, "is_ip6": 1}
)
diff --git a/test/vm_vpp_interfaces.py b/test/vm_vpp_interfaces.py
index 85417dcbca0..0f1e33d679b 100644
--- a/test/vm_vpp_interfaces.py
+++ b/test/vm_vpp_interfaces.py
@@ -489,11 +489,15 @@ class TestVPPInterfacesQemu:
except Exception:
pass
try:
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": layer3["ip4_vrf"]})
+ self.vapi.ip_table_add_del_v2(
+ is_add=0, table={"table_id": layer3["ip4_vrf"]}
+ )
except Exception:
pass
try:
- self.vapi.ip_table_add_del(is_add=0, table={"table_id": layer3["ip6_vrf"]})
+ self.vapi.ip_table_add_del_v2(
+ is_add=0, table={"table_id": layer3["ip6_vrf"]}
+ )
except Exception:
pass
try:
@@ -693,7 +697,7 @@ class TestVPPInterfacesQemu:
vrf_id -- vrf_id
"""
is_ipv6 = 0 if ip_version == 4 else 1
- self.vapi.ip_table_add_del(
+ self.vapi.ip_table_add_del_v2(
is_add=1, table={"table_id": vrf_id, "is_ip6": is_ipv6}
)
for sw_if_index, ip_prefix in if_idx_ip_prefixes:
diff --git a/test/vpp_ip_route.py b/test/vpp_ip_route.py
index d36c56761e3..31aab3a03ee 100644
--- a/test/vpp_ip_route.py
+++ b/test/vpp_ip_route.py
@@ -169,16 +169,20 @@ def fib_interface_ip_prefix(test, addr, len, sw_if_index):
class VppIpTable(VppObject):
- def __init__(self, test, table_id, is_ip6=0, register=True, name=""):
+ def __init__(
+ self, test, table_id, is_ip6=0, register=True, name="", create_mfib=True
+ ):
self._test = test
self.name = name
self.table_id = table_id
self.is_ip6 = is_ip6
self.register = register
+ self.create_mfib = True
def add_vpp_config(self):
- self._test.vapi.ip_table_add_del(
+ self._test.vapi.ip_table_add_del_v2(
is_add=1,
+ create_mfib=self.create_mfib,
table={"is_ip6": self.is_ip6, "table_id": self.table_id, "name": self.name},
)
if self.register:
@@ -186,7 +190,7 @@ class VppIpTable(VppObject):
return self
def remove_vpp_config(self):
- self._test.vapi.ip_table_add_del(
+ self._test.vapi.ip_table_add_del_v2(
is_add=0, table={"is_ip6": self.is_ip6, "table_id": self.table_id}
)