diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2019-03-18 13:17:53 +0100 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-08-20 09:57:10 +0000 |
commit | 053204ab039d34a990ff0e14c32ce3b294fcce0e (patch) | |
tree | 7261eaf0b905ea456ac536d8f728e89319b16a69 /test/test_ip4.py | |
parent | df36f4963f1a590ce9a02f048507c3d4590580ae (diff) |
api: Cleanup APIs interface.api
Use of consistent API types for interface.api
Type: fix
Change-Id: I88206d7d0907cffd564031f73c9a996df2e5e21a
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'test/test_ip4.py')
-rw-r--r-- | test/test_ip4.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/test_ip4.py b/test/test_ip4.py index 0923771200e..60bc023a280 100644 --- a/test/test_ip4.py +++ b/test/test_ip4.py @@ -13,6 +13,7 @@ from six import moves from framework import VppTestCase, VppTestRunner from util import ppp +from vpp_ip import VppIpPrefix from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpMRoute, \ VppMRoutePath, MRouteItfFlags, MRouteEntryFlags, VppMplsIpBind, \ VppMplsTable, VppIpTable, FibPathType, find_route, \ @@ -920,8 +921,8 @@ class TestIPSubNets(VppTestCase): ip_addr_n = socket.inet_pton(socket.AF_INET, "10.10.10.10") self.vapi.sw_interface_add_del_address( - sw_if_index=self.pg0.sw_if_index, address=ip_addr_n, - address_length=16) + sw_if_index=self.pg0.sw_if_index, + prefix=VppIpPrefix("10.10.10.10", 16).encode()) pn = (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) / @@ -939,8 +940,9 @@ class TestIPSubNets(VppTestCase): # remove the sub-net and we are forwarding via the cover again self.vapi.sw_interface_add_del_address( - sw_if_index=self.pg0.sw_if_index, address=ip_addr_n, - address_length=16, is_add=0) + sw_if_index=self.pg0.sw_if_index, + prefix=VppIpPrefix("10.10.10.10", 16).encode(), is_add=0) + self.pg1.add_stream(pn) self.pg_enable_capture(self.pg_interfaces) self.pg_start() @@ -957,8 +959,8 @@ class TestIPSubNets(VppTestCase): ip_addr_n = socket.inet_pton(socket.AF_INET, "10.10.10.10") self.vapi.sw_interface_add_del_address( - sw_if_index=self.pg0.sw_if_index, address=ip_addr_n, - address_length=31) + sw_if_index=self.pg0.sw_if_index, + prefix=VppIpPrefix("10.10.10.10", 31).encode()) pn = (Ether(src=self.pg1.remote_mac, dst=self.pg1.local_mac) / @@ -974,8 +976,9 @@ class TestIPSubNets(VppTestCase): # remove the sub-net and we are forwarding via the cover again self.vapi.sw_interface_add_del_address( - sw_if_index=self.pg0.sw_if_index, address=ip_addr_n, - address_length=31, is_add=0) + sw_if_index=self.pg0.sw_if_index, + prefix=VppIpPrefix("10.10.10.10", 31).encode(), is_add=0) + self.pg1.add_stream(pn) self.pg_enable_capture(self.pg_interfaces) self.pg_start() |