diff options
author | Ole Troan <ot@cisco.com> | 2019-03-04 23:55:43 +0100 |
---|---|---|
committer | Ole Troan <ot@cisco.com> | 2019-03-04 23:55:43 +0100 |
commit | e1ade684eb5a7e5743abfda47488165452cc5b64 (patch) | |
tree | 63b4e3ccc361904b42e0020bfc16b4d110cd0095 | |
parent | fd06084a9e86c5f67c4b1dc37e78a95a9bacf2a4 (diff) |
test framework: Fix wrapper functions to match API message names.
In preparation to remove the wrappers in vpp_papi_provider.py, ensure
names used in tests match the actual API message names.
Change-Id: I230ca4eb75aa727ff68d702e085a2edbbc6b6d19
Signed-off-by: Ole Troan <ot@cisco.com>
-rw-r--r-- | test/lisp.py | 27 | ||||
-rw-r--r-- | test/test_dhcp.py | 20 | ||||
-rw-r--r-- | test/test_dvr.py | 52 | ||||
-rw-r--r-- | test/test_gbp.py | 6 | ||||
-rw-r--r-- | test/test_gre.py | 12 | ||||
-rw-r--r-- | test/test_ip6.py | 8 | ||||
-rw-r--r-- | test/test_l2_fib.py | 8 | ||||
-rw-r--r-- | test/test_nat.py | 65 | ||||
-rw-r--r-- | test/test_p2p_ethernet.py | 18 | ||||
-rw-r--r-- | test/test_sctp.py | 8 | ||||
-rw-r--r-- | test/test_session.py | 8 | ||||
-rw-r--r-- | test/test_tcp.py | 8 | ||||
-rw-r--r-- | test/test_udp.py | 8 | ||||
-rw-r--r-- | test/test_vcl.py | 16 | ||||
-rw-r--r-- | test/vpp_gre_interface.py | 8 | ||||
-rw-r--r-- | test/vpp_interface.py | 36 | ||||
-rw-r--r-- | test/vpp_papi_provider.py | 220 | ||||
-rw-r--r-- | test/vpp_sub_interface.py | 6 |
18 files changed, 237 insertions, 297 deletions
diff --git a/test/lisp.py b/test/lisp.py index 90b8914b150..b1a185ab713 100644 --- a/test/lisp.py +++ b/test/lisp.py @@ -19,7 +19,7 @@ class VppLispLocatorSet(VppObject): return self._ls_name def add_vpp_config(self): - self.test.vapi.lisp_locator_set(ls_name=self._ls_name) + self.test.vapi.lisp_add_del_locator_set(ls_name=self._ls_name) self._test.registry.register(self, self.test.logger) def get_lisp_locator_sets_dump_entry(self): @@ -33,7 +33,8 @@ class VppLispLocatorSet(VppObject): return self.get_lisp_locator_sets_dump_entry() is not None def remove_vpp_config(self): - self.test.vapi.lisp_locator_set(ls_name=self._ls_name, is_add=0) + self.test.vapi.lisp_add_del_locator_set(ls_name=self._ls_name, + is_add=0) def object_id(self): return 'lisp-locator-set-%s' % self._ls_name @@ -72,10 +73,10 @@ class VppLispLocator(VppObject): return self._weight def add_vpp_config(self): - self.test.vapi.lisp_locator(ls_name=self._ls_name, - sw_if_index=self._sw_if_index, - priority=self._priority, - weight=self._weight) + self.test.vapi.lisp_add_del_locator(ls_name=self._ls_name, + sw_if_index=self._sw_if_index, + priority=self._priority, + weight=self._weight) self._test.registry.register(self, self.test.logger) def get_lisp_locator_dump_entry(self): @@ -91,7 +92,7 @@ class VppLispLocator(VppObject): return locator is not None def remove_vpp_config(self): - self.test.vapi.lisp_locator( + self.test.vapi.lisp_add_del_locator( ls_name=self._ls_name, sw_if_index=self._sw_if_index, priority=self._priority, weight=self._weight, is_add=0) self._test.registry.register(self, self.test.logger) @@ -212,14 +213,14 @@ class VppLocalMapping(VppLispMapping): return self._key def add_vpp_config(self): - self.test.vapi.lisp_local_mapping( + self.test.vapi.lisp_add_del_local_eid( ls_name=self._ls_name, eid_type=self._eid.eid_type, eid=str(self._eid), prefix_len=self._eid.prefix_length, vni=self._vni, key_id=self._key_id, key=self._key) self._test.registry.register(self, self.test.logger) def remove_vpp_config(self): - self.test.vapi.lisp_local_mapping( + self.test.vapi.lisp_add_del_local_eid( ls_name=self._ls_name, eid_type=self._eid.eid_type, eid=str(self._eid), prefix_len=self._eid.prefix_length, vni=self._vni, is_add=0) @@ -240,14 +241,14 @@ class VppRemoteMapping(VppLispMapping): return self._rlocs def add_vpp_config(self): - self.test.vapi.lisp_remote_mapping( + self.test.vapi.lisp_add_del_remote_mapping( rlocs=self._rlocs, eid_type=self._eid.eid_type, eid=str(self._eid), eid_prefix_len=self._eid.prefix_length, vni=self._vni, rlocs_num=len(self._rlocs)) self._test.registry.register(self, self.test.logger) def remove_vpp_config(self): - self.test.vapi.lisp_remote_mapping( + self.test.vapi.lisp_add_del_remote_mapping( eid_type=self._eid.eid_type, eid=str(self._eid), eid_prefix_len=self._eid.prefix_length, vni=self._vni, is_add=0, rlocs_num=0) @@ -284,7 +285,7 @@ class VppLispAdjacency(VppObject): return self._vni def add_vpp_config(self): - self.test.vapi.lisp_adjacency( + self.test.vapi.lisp_add_del_adjacency( leid=str(self._leid), reid=str(self._reid), eid_type=self._leid.eid_type, leid_len=self._leid.prefix_length, @@ -316,7 +317,7 @@ class VppLispAdjacency(VppObject): return False def remove_vpp_config(self): - self.test.vapi.lisp_adjacency( + self.test.vapi.lisp_add_del_adjacency( leid=str(self._leid), reid=str(self._reid), eid_type=self._leid.eid_type, leid_len=self._leid.prefix_length, diff --git a/test/test_dhcp.py b/test/test_dhcp.py index d1af9fd9e7d..2efa9a7e244 100644 --- a/test/test_dhcp.py +++ b/test/test_dhcp.py @@ -1213,7 +1213,7 @@ class TestDHCP(VppTestCase): # # Configure DHCP client on PG3 and capture the discover sent # - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname) rx = self.pg3.get_capture(1) @@ -1283,7 +1283,7 @@ class TestDHCP(VppTestCase): # # remove the DHCP config # - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname, is_add=0) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname, is_add=0) # # and now the route should be gone @@ -1297,8 +1297,8 @@ class TestDHCP(VppTestCase): self.pg3.admin_down() self.sleep(1) self.pg3.admin_up() - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname, - client_id=self.pg3.local_mac) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname, + client_id=self.pg3.local_mac) rx = self.pg3.get_capture(1) @@ -1355,7 +1355,7 @@ class TestDHCP(VppTestCase): # # remove the DHCP config # - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname, is_add=0) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname, is_add=0) self.assertFalse(find_route(self, self.pg3.local_ip4, 32)) self.assertFalse(find_route(self, self.pg3.local_ip4, 24)) @@ -1367,8 +1367,8 @@ class TestDHCP(VppTestCase): # # Configure DHCP client on PG3 and capture the discover sent # - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname, - set_broadcast_flag=0) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname, + set_broadcast_flag=0) rx = self.pg3.get_capture(1) @@ -1462,7 +1462,7 @@ class TestDHCP(VppTestCase): # # remove the DHCP config # - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname, is_add=0) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname, is_add=0) # # and now the route should be gone @@ -1476,7 +1476,7 @@ class TestDHCP(VppTestCase): self.pg3.admin_down() self.sleep(1) self.pg3.admin_up() - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname) rx = self.pg3.get_capture(1) @@ -1553,7 +1553,7 @@ class TestDHCP(VppTestCase): # # remove the DHCP config # - self.vapi.dhcp_client(self.pg3.sw_if_index, hostname, is_add=0) + self.vapi.dhcp_client_config(self.pg3.sw_if_index, hostname, is_add=0) if __name__ == '__main__': diff --git a/test/test_dvr.py b/test/test_dvr.py index 7a744baf76c..d2088ea2320 100644 --- a/test/test_dvr.py +++ b/test/test_dvr.py @@ -91,12 +91,14 @@ class TestDVR(VppTestCase): self.vapi.sw_interface_set_l2_bridge(self.loop0.sw_if_index, 1, port_type=L2_PORT_TYPE.BVI) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg2.sw_if_index, - L2_VTR_OP.L2_POP_1, - 92) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg3.sw_if_index, - L2_VTR_OP.L2_POP_1, - 93) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg2.sw_if_index, + L2_VTR_OP.L2_POP_1, + 92) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg3.sw_if_index, + L2_VTR_OP.L2_POP_1, + 93) # # Add routes to bridge the traffic via a tagged an nontagged interface @@ -291,12 +293,14 @@ class TestDVR(VppTestCase): self.vapi.sw_interface_set_l2_bridge(self.pg1.sw_if_index, 1) self.vapi.sw_interface_set_l2_bridge(sub_if_on_pg2.sw_if_index, 1) self.vapi.sw_interface_set_l2_bridge(sub_if_on_pg3.sw_if_index, 1) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg2.sw_if_index, - L2_VTR_OP.L2_POP_1, - 92) - self.vapi.sw_interface_set_l2_tag_rewrite(sub_if_on_pg3.sw_if_index, - L2_VTR_OP.L2_POP_1, - 93) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg2.sw_if_index, + L2_VTR_OP.L2_POP_1, + 92) + self.vapi.l2_interface_vlan_tag_rewrite( + sub_if_on_pg3.sw_if_index, + L2_VTR_OP.L2_POP_1, + 93) # # Disable UU flooding, learning and ARP terminaation. makes this test @@ -326,10 +330,10 @@ class TestDVR(VppTestCase): # # Enable L3 extraction on pgs # - self.vapi.sw_interface_set_l2_emulation(self.pg0.sw_if_index) - self.vapi.sw_interface_set_l2_emulation(self.pg1.sw_if_index) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg2.sw_if_index) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg3.sw_if_index) + self.vapi.l2_emulation(self.pg0.sw_if_index) + self.vapi.l2_emulation(self.pg1.sw_if_index) + self.vapi.l2_emulation(sub_if_on_pg2.sw_if_index) + self.vapi.l2_emulation(sub_if_on_pg3.sw_if_index) # # now we expect the packet forward according to the DVR route @@ -358,14 +362,14 @@ class TestDVR(VppTestCase): # # cleanup # - self.vapi.sw_interface_set_l2_emulation(self.pg0.sw_if_index, - enable=0) - self.vapi.sw_interface_set_l2_emulation(self.pg1.sw_if_index, - enable=0) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg2.sw_if_index, - enable=0) - self.vapi.sw_interface_set_l2_emulation(sub_if_on_pg3.sw_if_index, - enable=0) + self.vapi.l2_emulation(self.pg0.sw_if_index, + enable=0) + self.vapi.l2_emulation(self.pg1.sw_if_index, + enable=0) + self.vapi.l2_emulation(sub_if_on_pg2.sw_if_index, + enable=0) + self.vapi.l2_emulation(sub_if_on_pg3.sw_if_index, + enable=0) self.vapi.sw_interface_set_l2_bridge(self.pg0.sw_if_index, 1, enable=0) diff --git a/test/test_gbp.py b/test/test_gbp.py index 28868c1a499..ec72981df16 100644 --- a/test/test_gbp.py +++ b/test/test_gbp.py @@ -1892,9 +1892,9 @@ class TestGBP(VppTestCase): # vlan_11 = VppDot1QSubint(self, self.pg0, 11) vlan_11.admin_up() - self.vapi.sw_interface_set_l2_tag_rewrite(vlan_11.sw_if_index, - L2_VTR_OP.L2_POP_1, - 11) + self.vapi.l2_interface_vlan_tag_rewrite(vlan_11.sw_if_index, + L2_VTR_OP.L2_POP_1, + 11) bd_uu_fwd = VppVxlanGbpTunnel(self, self.pg3.local_ip4, self.pg3.remote_ip4, 116) diff --git a/test/test_gre.py b/test/test_gre.py index 044b72993ae..ccd66c428e8 100644 --- a/test/test_gre.py +++ b/test/test_gre.py @@ -824,12 +824,12 @@ class TestGRE(VppTestCase): # Configure both to pop thier respective VLAN tags, # so that during the x-coonect they will subsequently push # - self.vapi.sw_interface_set_l2_tag_rewrite(gre_if_12.sw_if_index, - L2_VTR_OP.L2_POP_1, - 12) - self.vapi.sw_interface_set_l2_tag_rewrite(gre_if_11.sw_if_index, - L2_VTR_OP.L2_POP_1, - 11) + self.vapi.l2_interface_vlan_tag_rewrite(gre_if_12.sw_if_index, + L2_VTR_OP.L2_POP_1, + 12) + self.vapi.l2_interface_vlan_tag_rewrite(gre_if_11.sw_if_index, + L2_VTR_OP.L2_POP_1, + 11) # # Send traffic in both directiond - expect the VLAN tags to diff --git a/test/test_ip6.py b/test/test_ip6.py index 5a5ba51f0ed..f75fb4ee431 100644 --- a/test/test_ip6.py +++ b/test/test_ip6.py @@ -1345,7 +1345,7 @@ class IPv6NDProxyTest(TestIPv6ND): # # Add proxy support for the host # - self.vapi.ip6_nd_proxy( + self.vapi.ip6nd_proxy_add_del( inet_pton(AF_INET6, self.pg0._remote_hosts[2].ip6), self.pg1.sw_if_index) @@ -1412,7 +1412,7 @@ class IPv6NDProxyTest(TestIPv6ND): ICMPv6NDOptSrcLLAddr( lladdr=self.pg0._remote_hosts[2].mac)) - self.vapi.ip6_nd_proxy( + self.vapi.ip6nd_proxy_add_del( inet_pton(AF_INET6, self.pg0._remote_hosts[3].ip6), self.pg2.sw_if_index) @@ -1452,11 +1452,11 @@ class IPv6NDProxyTest(TestIPv6ND): # # remove the proxy configs # - self.vapi.ip6_nd_proxy( + self.vapi.ip6nd_proxy_add_del( inet_pton(AF_INET6, self.pg0._remote_hosts[2].ip6), self.pg1.sw_if_index, is_del=1) - self.vapi.ip6_nd_proxy( + self.vapi.ip6nd_proxy_add_del( inet_pton(AF_INET6, self.pg0._remote_hosts[3].ip6), self.pg2.sw_if_index, is_del=1) diff --git a/test/test_l2_fib.py b/test/test_l2_fib.py index 1cee58982e5..ac70c8a726d 100644 --- a/test/test_l2_fib.py +++ b/test/test_l2_fib.py @@ -482,7 +482,7 @@ class TestL2fib(VppTestCase): bd1 = 1 hosts = self.create_hosts(10, subnet=39) - self.vapi.want_macs_learn_events() + self.vapi.want_l2_macs_events() self.learn_hosts(bd1, hosts) self.sleep(1) @@ -493,7 +493,7 @@ class TestL2fib(VppTestCase): if e.mac[i].action == MAC_EVENT_ACTION_ADD} macs = {h.bin_mac for swif in self.bd_ifs(bd1) for h in hosts[self.pg_interfaces[swif].sw_if_index]} - self.vapi.want_macs_learn_events(enable_disable=0) + self.vapi.want_l2_macs_events(enable_disable=0) self.assertEqual(len(learned_macs ^ macs), 0) def test_l2_fib_macs_learn_max(self): @@ -503,13 +503,13 @@ class TestL2fib(VppTestCase): hosts = self.create_hosts(10, subnet=40) ev_macs = 1 - self.vapi.want_macs_learn_events(max_macs_in_event=ev_macs) + self.vapi.want_l2_macs_events(max_macs_in_event=ev_macs) self.learn_hosts(bd1, hosts) self.sleep(1) self.logger.info(self.vapi.ppcli("show l2fib")) evs = self.vapi.collect_events() - self.vapi.want_macs_learn_events(enable_disable=0) + self.vapi.want_l2_macs_events(enable_disable=0) self.assertGreater(len(evs), 0) learned_macs = { diff --git a/test/test_nat.py b/test/test_nat.py index 4fb462c36b7..1ccaf32dc1d 100644 --- a/test/test_nat.py +++ b/test/test_nat.py @@ -103,12 +103,13 @@ class MethodHolder(VppTestCase): interfaces = self.vapi.nat44_interface_addr_dump() for intf in interfaces: - self.vapi.nat44_add_interface_addr(intf.sw_if_index, - twice_nat=intf.twice_nat, - is_add=0) + self.vapi.nat44_add_del_interface_addr(intf.sw_if_index, + twice_nat=intf.twice_nat, + is_add=0) - self.vapi.nat_ipfix(enable=0, src_port=self.ipfix_src_port, - domain_id=self.ipfix_domain_id) + self.vapi.nat_ipfix_enable_disable(enable=0, + src_port=self.ipfix_src_port, + domain_id=self.ipfix_domain_id) self.ipfix_src_port = 4739 self.ipfix_domain_id = 1 @@ -2577,7 +2578,7 @@ class TestNAT44(MethodHolder): def test_interface_addr(self): """ Acquire NAT44 addresses from interface """ - self.vapi.nat44_add_interface_addr(self.pg7.sw_if_index) + self.vapi.nat44_add_del_interface_addr(self.pg7.sw_if_index) # no address in NAT pool adresses = self.vapi.nat44_address_dump() @@ -2598,7 +2599,7 @@ class TestNAT44(MethodHolder): """ Static mapping with addresses from interface """ tag = "testTAG" - self.vapi.nat44_add_interface_addr(self.pg7.sw_if_index) + self.vapi.nat44_add_del_interface_addr(self.pg7.sw_if_index) self.nat44_add_static_mapping( '1.2.3.4', external_sw_if_index=self.pg7.sw_if_index, @@ -2658,7 +2659,7 @@ class TestNAT44(MethodHolder): """ Identity NAT with addresses from interface """ port = 53053 - self.vapi.nat44_add_interface_addr(self.pg7.sw_if_index) + self.vapi.nat44_add_del_interface_addr(self.pg7.sw_if_index) self.vapi.nat44_add_del_identity_mapping( sw_if_index=self.pg7.sw_if_index, port=port, @@ -2707,8 +2708,8 @@ class TestNAT44(MethodHolder): path_mtu=512, template_interval=10, collector_port=colector_port) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) pkts = self.create_stream_in(self.pg0, self.pg1) self.pg0.add_stream(pkts) @@ -2746,8 +2747,8 @@ class TestNAT44(MethodHolder): src_address=self.pg3.local_ip4n, path_mtu=512, template_interval=10) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg0.remote_ip4, dst=self.pg1.remote_ip4) / @@ -2804,8 +2805,8 @@ class TestNAT44(MethodHolder): src_address=self.pg3.local_ip4n, path_mtu=512, template_interval=10) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) p = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) / IP(src=self.pg0.remote_ip4, dst=self.pg1.remote_ip4) / @@ -3532,7 +3533,7 @@ class TestNAT44(MethodHolder): def test_frag_forwarding(self): """ NAT44 forwarding fragment test """ - self.vapi.nat44_add_interface_addr(self.pg1.sw_if_index) + self.vapi.nat44_add_del_interface_addr(self.pg1.sw_if_index) self.vapi.nat44_interface_add_del_feature(self.pg0.sw_if_index) self.vapi.nat44_interface_add_del_feature(self.pg1.sw_if_index, is_inside=0) @@ -3663,8 +3664,8 @@ class TestNAT44(MethodHolder): src_address=self.pg3.local_ip4n, path_mtu=512, template_interval=10) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) data = "A" * 4 + "B" * 16 + "C" * 3 self.tcp_port_in = random.randint(1025, 65535) @@ -5448,7 +5449,8 @@ class TestNAT44EndpointDependent(MethodHolder): def test_twice_nat_interface_addr(self): """ Acquire twice NAT44 addresses from interface """ - self.vapi.nat44_add_interface_addr(self.pg3.sw_if_index, twice_nat=1) + self.vapi.nat44_add_del_interface_addr(self.pg3.sw_if_index, + twice_nat=1) # no address in NAT pool adresses = self.vapi.nat44_address_dump() @@ -6340,8 +6342,8 @@ class TestNAT44EndpointDependent(MethodHolder): self.pg_start() capture = self.pg1.get_capture(len(pkts)) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg0.remote_ip4, dst=self.pg1.remote_ip4) / @@ -7043,7 +7045,7 @@ class TestDeterministicNAT(MethodHolder): src_address=self.pg2.local_ip4n, path_mtu=512, template_interval=10) - self.vapi.nat_ipfix() + self.vapi.nat_ipfix_enable_disable() pkts = [] for port in range(1025, 2025): @@ -7103,7 +7105,7 @@ class TestDeterministicNAT(MethodHolder): """ Clear deterministic NAT configuration. """ - self.vapi.nat_ipfix(enable=0) + self.vapi.nat_ipfix_enable_disable(enable=0) self.vapi.nat_set_timeouts() deterministic_mappings = self.vapi.nat_det_map_dump() for dsm in deterministic_mappings: @@ -8160,7 +8162,7 @@ class TestNAT64(MethodHolder): def test_interface_addr(self): """ Acquire NAT64 pool addresses from interface """ - self.vapi.nat64_add_interface_addr(self.pg4.sw_if_index) + self.vapi.nat64_add_del_interface_addr(self.pg4.sw_if_index) # no address in NAT64 pool adresses = self.vapi.nat44_address_dump() @@ -8212,8 +8214,8 @@ class TestNAT64(MethodHolder): src_address=self.pg3.local_ip4n, path_mtu=512, template_interval=10) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IPv6(src=src, dst=remote_host_ip6) / @@ -8277,8 +8279,8 @@ class TestNAT64(MethodHolder): src_address=self.pg3.local_ip4n, path_mtu=512, template_interval=10) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) data = 'a' * 200 pkts = self.create_stream_frag_ip6(self.pg0, self.pg1.remote_ip4, @@ -8325,8 +8327,8 @@ class TestNAT64(MethodHolder): src_address=self.pg3.local_ip4n, path_mtu=512, template_interval=10) - self.vapi.nat_ipfix(domain_id=self.ipfix_domain_id, - src_port=self.ipfix_src_port) + self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id, + src_port=self.ipfix_src_port) # Create p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / @@ -8439,8 +8441,9 @@ class TestNAT64(MethodHolder): """ Clear NAT64 configuration. """ - self.vapi.nat_ipfix(enable=0, src_port=self.ipfix_src_port, - domain_id=self.ipfix_domain_id) + self.vapi.nat_ipfix_enable_disable(enable=0, + src_port=self.ipfix_src_port, + domain_id=self.ipfix_domain_id) self.ipfix_src_port = 4739 self.ipfix_domain_id = 1 diff --git a/test/test_p2p_ethernet.py b/test/test_p2p_ethernet.py index 34a4c24f655..75c39014417 100644 --- a/test/test_p2p_ethernet.py +++ b/test/test_p2p_ethernet.py @@ -37,8 +37,8 @@ class P2PEthernetAPI(VppTestCase): self.p2p_sub_ifs.append(p2p) def delete_p2p_ethernet(self, parent_if, remote_mac): - self.vapi.delete_p2pethernet_subif(parent_if.sw_if_index, - mac_pton(remote_mac)) + self.vapi.p2p_ethernet_del(parent_if.sw_if_index, + mac_pton(remote_mac)) def test_api(self): """delete/create p2p subif""" @@ -78,9 +78,9 @@ class P2PEthernetAPI(VppTestCase): for i in range(1, clients+1): try: macs.append(':'.join(re.findall('..', '{:02x}'.format(mac+i)))) - self.vapi.create_p2pethernet_subif(self.pg2.sw_if_index, - mac_pton(macs[i-1]), - i) + self.vapi.p2p_ethernet_add(self.pg2.sw_if_index, + mac_pton(macs[i-1]), + i) except Exception: self.logger.info("Failed to create subif %d %s" % ( i, macs[i-1])) @@ -153,8 +153,8 @@ class P2PEthernetIPV6(VppTestCase): def delete_p2p_ethernet(self, p2p): p2p.unconfig_ip6() p2p.admin_down() - self.vapi.delete_p2pethernet_subif(p2p.parent.sw_if_index, - p2p.p2p_remote_mac) + self.vapi.p2p_ethernet_del(p2p.parent.sw_if_index, + p2p.p2p_remote_mac) def create_stream(self, src_mac=None, dst_mac=None, src_ip=None, dst_ip=None, size=None): @@ -397,8 +397,8 @@ class P2PEthernetIPV4(VppTestCase): def delete_p2p_ethernet(self, p2p): p2p.unconfig_ip4() p2p.admin_down() - self.vapi.delete_p2pethernet_subif(p2p.parent.sw_if_index, - p2p.p2p_remote_mac) + self.vapi.p2p_ethernet_del(p2p.parent.sw_if_index, + p2p.p2p_remote_mac) def test_ip4_rx_p2p_subif(self): """receive ipv4 packet via p2p subinterface""" diff --git a/test/test_sctp.py b/test/test_sctp.py index f30feda111a..d7efc8c9353 100644 --- a/test/test_sctp.py +++ b/test/test_sctp.py @@ -32,10 +32,10 @@ class TestSCTP(VppTestCase): table_id += 1 # Configure namespaces - self.vapi.app_namespace_add(namespace_id="0", - sw_if_index=self.loop0.sw_if_index) - self.vapi.app_namespace_add(namespace_id="1", - sw_if_index=self.loop1.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="0", + sw_if_index=self.loop0.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="1", + sw_if_index=self.loop1.sw_if_index) def tearDown(self): for i in self.lo_interfaces: diff --git a/test/test_session.py b/test/test_session.py index 3336f4de71d..5f4f3f5cfba 100644 --- a/test/test_session.py +++ b/test/test_session.py @@ -33,10 +33,10 @@ class TestSession(VppTestCase): table_id += 1 # Configure namespaces - self.vapi.app_namespace_add(namespace_id="0", - sw_if_index=self.loop0.sw_if_index) - self.vapi.app_namespace_add(namespace_id="1", - sw_if_index=self.loop1.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="0", + sw_if_index=self.loop0.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="1", + sw_if_index=self.loop1.sw_if_index) def tearDown(self): for i in self.lo_interfaces: diff --git a/test/test_tcp.py b/test/test_tcp.py index ff231341001..5f2bce5ae63 100644 --- a/test/test_tcp.py +++ b/test/test_tcp.py @@ -32,10 +32,10 @@ class TestTCP(VppTestCase): table_id += 1 # Configure namespaces - self.vapi.app_namespace_add(namespace_id="0", - sw_if_index=self.loop0.sw_if_index) - self.vapi.app_namespace_add(namespace_id="1", - sw_if_index=self.loop1.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="0", + sw_if_index=self.loop0.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="1", + sw_if_index=self.loop1.sw_if_index) def tearDown(self): for i in self.lo_interfaces: diff --git a/test/test_udp.py b/test/test_udp.py index 96375f056f7..a52ba27f64e 100644 --- a/test/test_udp.py +++ b/test/test_udp.py @@ -259,10 +259,10 @@ class TestUDP(VppTestCase): table_id += 1 # Configure namespaces - self.vapi.app_namespace_add(namespace_id="0", - sw_if_index=self.loop0.sw_if_index) - self.vapi.app_namespace_add(namespace_id="1", - sw_if_index=self.loop1.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="0", + sw_if_index=self.loop0.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="1", + sw_if_index=self.loop1.sw_if_index) def tearDown(self): for i in self.lo_interfaces: diff --git a/test/test_vcl.py b/test/test_vcl.py index 0a971a59a78..71ad902d208 100644 --- a/test/test_vcl.py +++ b/test/test_vcl.py @@ -103,10 +103,10 @@ class VCLTestCase(VppTestCase): table_id += 1 # Configure namespaces - self.vapi.app_namespace_add(namespace_id="1", secret=1234, - sw_if_index=self.loop0.sw_if_index) - self.vapi.app_namespace_add(namespace_id="2", secret=5678, - sw_if_index=self.loop1.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="1", secret=1234, + sw_if_index=self.loop0.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="2", secret=5678, + sw_if_index=self.loop1.sw_if_index) # Add inter-table routes ip_t01 = VppIpRoute(self, self.loop1.local_ip4, 32, @@ -146,10 +146,10 @@ class VCLTestCase(VppTestCase): table_id += 1 # Configure namespaces - self.vapi.app_namespace_add(namespace_id="1", secret=1234, - sw_if_index=self.loop0.sw_if_index) - self.vapi.app_namespace_add(namespace_id="2", secret=5678, - sw_if_index=self.loop1.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="1", secret=1234, + sw_if_index=self.loop0.sw_if_index) + self.vapi.app_namespace_add_del(namespace_id="2", secret=5678, + sw_if_index=self.loop1.sw_if_index) # Add inter-table routes ip_t01 = VppIpRoute(self, self.loop1.local_ip6, 128, diff --git a/test/vpp_gre_interface.py b/test/vpp_gre_interface.py index d5a40eeb03d..d6f4202cf1a 100644 --- a/test/vpp_gre_interface.py +++ b/test/vpp_gre_interface.py @@ -21,7 +21,7 @@ class VppGreInterface(VppInterface): def add_vpp_config(self): s = socket.inet_pton(socket.AF_INET, self.t_src) d = socket.inet_pton(socket.AF_INET, self.t_dst) - r = self.test.vapi.gre_tunnel_add_del(s, d, + r = self.test.vapi.gre_add_del_tunnel(s, d, outer_fib_id=self.t_outer_fib, tunnel_type=self.t_type, session_id=self.t_session) @@ -33,7 +33,7 @@ class VppGreInterface(VppInterface): s = socket.inet_pton(socket.AF_INET, self.t_src) d = socket.inet_pton(socket.AF_INET, self.t_dst) self.unconfig() - self.test.vapi.gre_tunnel_add_del(s, d, + self.test.vapi.gre_add_del_tunnel(s, d, outer_fib_id=self.t_outer_fib, tunnel_type=self.t_type, session_id=self.t_session, @@ -64,7 +64,7 @@ class VppGre6Interface(VppInterface): def add_vpp_config(self): s = socket.inet_pton(socket.AF_INET6, self.t_src) d = socket.inet_pton(socket.AF_INET6, self.t_dst) - r = self.test.vapi.gre_tunnel_add_del(s, d, + r = self.test.vapi.gre_add_del_tunnel(s, d, outer_fib_id=self.t_outer_fib, tunnel_type=self.t_type, session_id=self.t_session, @@ -77,7 +77,7 @@ class VppGre6Interface(VppInterface): s = socket.inet_pton(socket.AF_INET6, self.t_src) d = socket.inet_pton(socket.AF_INET6, self.t_dst) self.unconfig() - self.test.vapi.gre_tunnel_add_del(s, d, + self.test.vapi.gre_add_del_tunnel(s, d, outer_fib_id=self.t_outer_fib, tunnel_type=self.t_type, session_id=self.t_session, diff --git a/test/vpp_interface.py b/test/vpp_interface.py index 2dcf149a593..b6f3a916798 100644 --- a/test/vpp_interface.py +++ b/test/vpp_interface.py @@ -333,25 +333,29 @@ class VppInterface(object): def disable_ipv6_ra(self): """Configure IPv6 RA suppress on the VPP interface.""" - self.test.vapi.sw_interface_ra_suppress(self.sw_if_index) + self.test.vapi.sw_interface_ip6nd_ra_config( + sw_if_index=self.sw_if_index, + suppress=1) def ip6_ra_config(self, no=0, suppress=0, send_unicast=0): """Configure IPv6 RA suppress on the VPP interface.""" - self.test.vapi.ip6_sw_interface_ra_config(self.sw_if_index, - no, - suppress, - send_unicast) + self.test.vapi.sw_interface_ip6nd_ra_config( + sw_if_index=self.sw_if_index, + is_no=no, + suppress=suppress, + send_unicast=send_unicast) def ip6_ra_prefix(self, address, address_length, is_no=0, off_link=0, no_autoconfig=0, use_default=0): """Configure IPv6 RA suppress on the VPP interface.""" - self.test.vapi.ip6_sw_interface_ra_prefix(self.sw_if_index, - address, - address_length, - is_no=is_no, - off_link=off_link, - no_autoconfig=no_autoconfig, - use_default=use_default) + self.test.vapi.sw_interface_ip6nd_ra_prefix( + self.sw_if_index, + address, + address_length, + is_no=is_no, + off_link=off_link, + no_autoconfig=no_autoconfig, + use_default=use_default) def admin_up(self): """Put interface ADMIN-UP.""" @@ -365,12 +369,12 @@ class VppInterface(object): def ip6_enable(self): """IPv6 Enable interface""" - self.test.vapi.ip6_sw_interface_enable_disable(self.sw_if_index, + self.test.vapi.sw_interface_ip6_enable_disable(self.sw_if_index, enable=1) def ip6_disable(self): """Put interface ADMIN-DOWN.""" - self.test.vapi.ip6_sw_interface_enable_disable(self.sw_if_index, + self.test.vapi.sw_interface_ip6_enable_disable(self.sw_if_index, enable=0) def add_sub_if(self, sub_if): @@ -388,12 +392,12 @@ class VppInterface(object): def enable_mpls(self): """Enable MPLS on the VPP interface.""" - self.test.vapi.sw_interface_enable_disable_mpls( + self.test.vapi.sw_interface_set_mpls_enable( self.sw_if_index) def disable_mpls(self): """Enable MPLS on the VPP interface.""" - self.test.vapi.sw_interface_enable_disable_mpls( + self.test.vapi.sw_interface_set_mpls_enable( self.sw_if_index, 0) def is_ip4_entry_in_fib_dump(self, dump): diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 7b5709ed8ac..9635aa5859b 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -336,8 +336,8 @@ class VppPapiProvider(object): return self.api(self.papi.ip_unnumbered_dump, {'sw_if_index': sw_if_index}) - def sw_interface_enable_disable_mpls(self, sw_if_index, - is_enable=1): + def sw_interface_set_mpls_enable(self, sw_if_index, + is_enable=1): """ Enable/Disable MPLS on the interface :param sw_if_index: @@ -348,11 +348,6 @@ class VppPapiProvider(object): {'sw_if_index': sw_if_index, 'enable': is_enable}) - def sw_interface_ra_suppress(self, sw_if_index, suppress=1): - return self.api(self.papi.sw_interface_ip6nd_ra_config, - {'sw_if_index': sw_if_index, - 'suppress': suppress}) - def set_ip_flow_hash(self, table_id, src=1, @@ -372,34 +367,24 @@ class VppPapiProvider(object): 'reverse': reverse, 'is_ipv6': is_ip6}) - def ip6_nd_proxy(self, ip, sw_if_index, is_del=0): + def ip6nd_proxy_add_del(self, ip, sw_if_index, is_del=0): return self.api(self.papi.ip6nd_proxy_add_del, {'ip': ip, 'sw_if_index': sw_if_index, 'is_del': is_del}) - def ip6_sw_interface_ra_config(self, sw_if_index, - no, - suppress, - send_unicast): - return self.api(self.papi.sw_interface_ip6nd_ra_config, - {'sw_if_index': sw_if_index, - 'is_no': no, - 'suppress': suppress, - 'send_unicast': send_unicast}) - - def ip6_sw_interface_ra_prefix(self, - sw_if_index, - address, - address_length, - use_default=0, - no_advertise=0, - off_link=0, - no_autoconfig=0, - no_onlink=0, - is_no=0, - val_lifetime=0xffffffff, - pref_lifetime=0xffffffff): + def sw_interface_ip6nd_ra_prefix(self, + sw_if_index, + address, + address_length, + use_default=0, + no_advertise=0, + off_link=0, + no_autoconfig=0, + no_onlink=0, + is_no=0, + val_lifetime=0xffffffff, + pref_lifetime=0xffffffff): return self.api(self.papi.sw_interface_ip6nd_ra_prefix, {'sw_if_index': sw_if_index, 'prefix': { @@ -415,7 +400,7 @@ class VppPapiProvider(object): 'val_lifetime': val_lifetime, 'pref_lifetime': pref_lifetime}) - def ip6_sw_interface_enable_disable(self, sw_if_index, enable): + def sw_interface_ip6_enable_disable(self, sw_if_index, enable): """ Enable/Disable An interface for IPv6 """ @@ -565,8 +550,8 @@ class VppPapiProvider(object): {'enable_disable': enable_disable, 'pid': os.getpid(), }) - def want_macs_learn_events(self, enable_disable=1, scan_delay=0, - max_macs_in_event=0, learn_limit=0): + def want_l2_macs_events(self, enable_disable=1, scan_delay=0, + max_macs_in_event=0, learn_limit=0): return self.api(self.papi.want_l2_macs_events, {'enable_disable': enable_disable, 'scan_delay': scan_delay, @@ -761,7 +746,7 @@ class VppPapiProvider(object): 'tx_sw_if_index': tx_sw_if_index, 'enable': enable}) - def sw_interface_set_l2_tag_rewrite( + def l2_interface_vlan_tag_rewrite( self, sw_if_index, vtr_oper, @@ -785,7 +770,7 @@ class VppPapiProvider(object): 'tag1': tag1, 'tag2': tag2}) - def sw_interface_set_l2_emulation( + def l2_emulation( self, sw_if_index, enable=1): @@ -830,16 +815,6 @@ class VppPapiProvider(object): {'sw_if_index': sw_if_index, 'mtu': mtu}) - def sw_interface_set_promiscuous(self, sw_if_index, enable): - """ - :param sw_if_index: - :param enable: - - """ - return self.api(self.papi.sw_interface_set_promiscuous, - {'sw_if_index': sw_if_index, - 'enable': enable}) - def sw_interface_set_mac_address(self, sw_if_index, mac): return self.api(self.papi.sw_interface_set_mac_address, {'sw_if_index': sw_if_index, @@ -880,7 +855,7 @@ class VppPapiProvider(object): 'outer_vlan_id': outer_vlan, 'inner_vlan_id': inner_vlan}) - def create_p2pethernet_subif(self, sw_if_index, remote_mac, subif_id): + def p2p_ethernet_add(self, sw_if_index, remote_mac, subif_id): """Create p2p ethernet subinterface :param sw_if_index: main (parent) interface @@ -901,7 +876,7 @@ class VppPapiProvider(object): return self.api(self.papi.delete_subif, {'sw_if_index': sw_if_index}) - def delete_p2pethernet_subif(self, sw_if_index, remote_mac): + def p2p_ethernet_del(self, sw_if_index, remote_mac): """Delete p2p ethernet subinterface :param sw_if_index: main (parent) interface @@ -1120,23 +1095,6 @@ class VppPapiProvider(object): } ) - def reset_vrf(self, - vrf_id, - is_ipv6=0, - ): - """ Reset VRF (remove all routes etc.) request. - - :param int vrf_id: ID of the FIB table / VRF to reset. - :param int is_ipv6: 1 for IPv6 neighbor, 0 for IPv4. (Default = 0) - """ - - return self.api( - self.papi.reset_vrf, - {'vrf_id': vrf_id, - 'is_ipv6': is_ipv6, - } - ) - def reset_fib(self, vrf_id, is_ipv6=0, @@ -1184,7 +1142,7 @@ class VppPapiProvider(object): 'is_l2': is_l2, }) - def gre_tunnel_add_del(self, + def gre_add_del_tunnel(self, src_address, dst_address, outer_fib_id=0, @@ -1249,11 +1207,6 @@ class VppPapiProvider(object): def udp_encap_dump(self): return self.api(self.papi.udp_encap_dump, {}) - def want_udp_encap_stats(self, enable=1): - return self.api(self.papi.want_udp_encap_stats, - {'enable': enable, - 'pid': os.getpid()}) - def mpls_fib_dump(self): return self.api(self.papi.mpls_fib_dump, {}) @@ -1591,7 +1544,7 @@ class VppPapiProvider(object): """ return self.api(self.papi.nat_show_config, {}) - def nat44_add_interface_addr( + def nat44_add_del_interface_addr( self, sw_if_index, twice_nat=0, @@ -1614,7 +1567,7 @@ class VppPapiProvider(object): """ return self.api(self.papi.nat44_interface_addr_dump, {}) - def nat_ipfix( + def nat_ipfix_enable_disable( self, domain_id=1, src_port=4739, @@ -2082,31 +2035,6 @@ class VppPapiProvider(object): """ return self.api(self.papi.nat64_bib_dump, {'proto': protocol}) - def nat64_set_timeouts(self, udp=300, icmp=60, tcp_trans=240, tcp_est=7440, - tcp_incoming_syn=6): - """Set values of timeouts for NAT64 (in seconds) - - :param udpi: UDP timeout (Default value = 300) - :param icmp: ICMP timeout (Default value = 60) - :param tcp_trans: TCP transitory timeout (Default value = 240) - :param tcp_est: TCP established timeout (Default value = 7440) - :param tcp_incoming_syn: TCP incoming SYN timeout (Default value = 6) - """ - return self.api( - self.papi.nat64_set_timeouts, - {'udp': udp, - 'icmp': icmp, - 'tcp_trans': tcp_trans, - 'tcp_est': tcp_est, - 'tcp_incoming_syn': tcp_incoming_syn}) - - def nat64_get_timeouts(self): - """Get values of timeouts for NAT64 - - :return: Timeouts for NAT64 (in seconds) - """ - return self.api(self.papi.nat64_get_timeouts, {}) - def nat64_st_dump(self, protocol=255): """Dump NAT64 session table @@ -2137,7 +2065,7 @@ class VppPapiProvider(object): """ return self.api(self.papi.nat64_prefix_dump, {}) - def nat64_add_interface_addr( + def nat64_add_del_interface_addr( self, sw_if_index, is_add=1): @@ -2591,13 +2519,13 @@ class VppPapiProvider(object): def dhcp_client_dump(self): return self.api(self.papi.dhcp_client_dump, {}) - def dhcp_client(self, - sw_if_index, - hostname, - client_id='', - is_add=1, - set_broadcast_flag=1, - want_dhcp_events=0): + def dhcp_client_config(self, + sw_if_index, + hostname, + client_id='', + is_add=1, + set_broadcast_flag=1, + want_dhcp_events=0): return self.api( self.papi.dhcp_client_config, { @@ -2662,9 +2590,9 @@ class VppPapiProvider(object): 'is_en': is_enabled, }) - def lisp_locator_set(self, - ls_name, - is_add=1): + def lisp_add_del_locator_set(self, + ls_name, + is_add=1): return self.api( self.papi.lisp_add_del_locator_set, { @@ -2675,12 +2603,12 @@ class VppPapiProvider(object): def lisp_locator_set_dump(self): return self.api(self.papi.lisp_locator_set_dump, {}) - def lisp_locator(self, - ls_name, - sw_if_index, - priority=1, - weight=1, - is_add=1): + def lisp_add_del_locator(self, + ls_name, + sw_if_index, + priority=1, + weight=1, + is_add=1): return self.api( self.papi.lisp_add_del_locator, { @@ -2700,15 +2628,15 @@ class VppPapiProvider(object): 'ls_index': ls_index, }) - def lisp_local_mapping(self, - ls_name, - eid_type, - eid, - prefix_len, - vni=0, - key_id=0, - key="", - is_add=1): + def lisp_add_del_local_eid(self, + ls_name, + eid_type, + eid, + prefix_len, + vni=0, + key_id=0, + key="", + is_add=1): return self.api( self.papi.lisp_add_del_local_eid, { @@ -2740,15 +2668,15 @@ class VppPapiProvider(object): 'filter': filter_opt, }) - def lisp_remote_mapping(self, - eid_type, - eid, - eid_prefix_len=0, - vni=0, - rlocs=[], - rlocs_num=0, - is_src_dst=0, - is_add=1): + def lisp_add_del_remote_mapping(self, + eid_type, + eid, + eid_prefix_len=0, + vni=0, + rlocs=[], + rlocs_num=0, + is_src_dst=0, + is_add=1): return self.api( self.papi.lisp_add_del_remote_mapping, { @@ -2762,14 +2690,14 @@ class VppPapiProvider(object): 'is_src_dst': is_src_dst, }) - def lisp_adjacency(self, - leid, - reid, - leid_len, - reid_len, - eid_type, - is_add=1, - vni=0): + def lisp_add_del_adjacency(self, + leid, + reid, + leid_len, + reid_len, + eid_type, + is_add=1, + vni=0): return self.api( self.papi.lisp_add_del_adjacency, { @@ -3562,12 +3490,12 @@ class VppPapiProvider(object): def ipsec_backend_dump(self): return self.api(self.papi.ipsec_backend_dump, {}) - def app_namespace_add(self, - namespace_id, - ip4_fib_id=0, - ip6_fib_id=0, - sw_if_index=0xFFFFFFFF, - secret=0): + def app_namespace_add_del(self, + namespace_id, + ip4_fib_id=0, + ip6_fib_id=0, + sw_if_index=0xFFFFFFFF, + secret=0): return self.api( self.papi.app_namespace_add_del, {'secret': secret, diff --git a/test/vpp_sub_interface.py b/test/vpp_sub_interface.py index 63a0f543f20..a374cba4354 100644 --- a/test/vpp_sub_interface.py +++ b/test/vpp_sub_interface.py @@ -119,7 +119,7 @@ class VppSubInterface(VppPGInterface): self._tag2 = inner self._push1q = push1q - self.test.vapi.sw_interface_set_l2_tag_rewrite( + self.test.vapi.l2_interface_vlan_tag_rewrite( self.sw_if_index, vtr, push=self._push1q, tag1=self._tag1, tag2=self._tag2) self._vtr = vtr @@ -198,8 +198,8 @@ class VppP2PSubint(VppSubInterface): def __init__(self, test, parent, sub_id, remote_mac): super(VppP2PSubint, self).__init__(test, parent, sub_id) - r = test.vapi.create_p2pethernet_subif(parent.sw_if_index, - remote_mac, sub_id) + r = test.vapi.p2p_ethernet_add(parent.sw_if_index, + remote_mac, sub_id) self.set_sw_if_index(r.sw_if_index) self.parent_sw_if_index = parent.sw_if_index self.p2p_remote_mac = remote_mac |