diff options
author | Ole Troan <ot@cisco.com> | 2018-12-11 13:04:01 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-12-12 00:34:43 +0000 |
commit | 0bcad32b3870f9998fa1393418081cdda685272f (patch) | |
tree | 0fcb518ffa5553bbec94c219cbc33fef48dbede3 /test/vpp_papi_provider.py | |
parent | 41b25cf6380d1420b24e191cd7e95cbce1e7cfdc (diff) |
PAPI: Allow ipaddress object as argument and return values from API calls
The API calls that use any of vl_api_address_t, vl_api_ip4_address,
vl_api_ip6_address_t, vl_api_prefix_t, vl_api_ip4_prefix_t,
vl_api_ip6_prefix_t now accepts either the old style dictionary,
a text string (2001:db8::/32) or an ipaddress ojbect.
Unless it is called with '_no_type_conversion':True, it will
also return an appropriate ipaddress object.
Change-Id: I84e4a1577bd57f6b5ae725f316a523988b6a955b
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 26d5fcf721c..320ea12c6dc 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -2821,7 +2821,8 @@ class VppPapiProvider(object): def vxlan_gbp_tunnel_dump(self, sw_if_index=0xffffffff): return self.api(self.papi.vxlan_gbp_tunnel_dump, - {'sw_if_index': sw_if_index}) + {'sw_if_index': sw_if_index, + '_no_type_conversion': True}) def pppoe_add_del_session( self, @@ -3553,7 +3554,8 @@ class VppPapiProvider(object): def gbp_endpoint_dump(self): """ GBP endpoint Dump """ - return self.api(self.papi.gbp_endpoint_dump, {}) + return self.api(self.papi.gbp_endpoint_dump, + {'_no_type_conversion': True}) def gbp_endpoint_group_add(self, epg, bd, rd, uplink_sw_if_index): @@ -3665,7 +3667,8 @@ class VppPapiProvider(object): def gbp_subnet_dump(self): """ GBP Subnet Dump """ - return self.api(self.papi.gbp_subnet_dump, {}) + return self.api(self.papi.gbp_subnet_dump, + {'_no_type_conversion': True}) def gbp_contract_add_del(self, is_add, src_epg, dst_epg, acl_index, rules): """ GBP contract Add/Del """ |