diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-06-06 14:07:55 -0400 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-06-26 11:36:57 +0000 |
commit | ab05508e1eb96749b68de8ccd2f6f88ff3e64fad (patch) | |
tree | 05f290dfff68a24810d0a3bdb2f7227ac4608114 /test/vpp_interface.py | |
parent | 941da4a224bbfc153bfe7c2344ae00e294d92798 (diff) |
api: refactor format_vl_api_prefix_t return keys
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length',
but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'.
Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'.
Type: refactor
Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/vpp_interface.py')
-rw-r--r-- | test/vpp_interface.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py index 7b9de828e6c..e8100d362ec 100644 --- a/test/vpp_interface.py +++ b/test/vpp_interface.py @@ -349,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 '<address>/<length_in_bits>' + or ipaddress.ipnetwork object (if strict.)""" + self.test.vapi.sw_interface_ip6nd_ra_prefix( sw_if_index=self.sw_if_index, - prefix={'address': address, - 'address_length': address_length}, + prefix=prefix, use_default=use_default, off_link=off_link, no_autoconfig=no_autoconfig, is_no=is_no) |