X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_interface.py;h=e8100d362ec772c34902d8367dc94f650aa0ce50;hb=bb2e5221a72911bc52be178cfdd22be0ba1b1ca8;hp=d586c849b02f1a86b1371b4d0401c0b092d0a861;hpb=6348074be4a7efd30f7f6af4c4ec940076afe2fe;p=vpp.git diff --git a/test/vpp_interface.py b/test/vpp_interface.py index d586c849b02..e8100d362ec 100644 --- a/test/vpp_interface.py +++ b/test/vpp_interface.py @@ -7,6 +7,12 @@ from six import moves from util import Host, mk_ll_addr from vpp_papi import mac_ntop +from ipaddress import IPv4Network + +try: + text_type = unicode +except NameError: + text_type = str @six.add_metaclass(abc.ABCMeta) @@ -229,7 +235,7 @@ class VppInterface(object): self._remote_addr_n = {socket.AF_INET: self.remote_ip4n, socket.AF_INET6: self.remote_ip6n} - r = self.test.vapi.sw_interface_dump() + r = self.test.vapi.sw_interface_dump(sw_if_index=self.sw_if_index) for intf in r: if intf.sw_if_index == self.sw_if_index: self._name = intf.interface_name.split(b'\0', @@ -343,14 +349,16 @@ class VppInterface(object): suppress=suppress, send_unicast=send_unicast) - # TODO: This should accept ipaddress object. - def ip6_ra_prefix(self, address, address_length, is_no=0, + def ip6_ra_prefix(self, prefix, is_no=0, off_link=0, no_autoconfig=0, use_default=0): - """Configure IPv6 RA suppress on the VPP interface.""" + """Configure IPv6 RA suppress on the VPP interface. + + prefix can be a string in the format of '
/