diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-09-05 15:42:26 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-09-11 16:00:29 +0000 |
commit | c0a93143412b4be7bba087bf633855aeeaee7c56 (patch) | |
tree | d3031d3a0af0963f75b54c169299425cd5d63319 /test/vpp_papi_provider.py | |
parent | 0d8cbc1b1503b633fd024e498e7664b489841075 (diff) |
GBP Endpoint Updates
- common types on the API
- endpoints keyed in various ways for DP lookup
- conparison functions for VPP IP address types
Change-Id: If7ec0bbc5cea71fd0983fe78987d147ec1bd7ec8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index b575b8ad6ac..3028a25b70b 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -3432,15 +3432,20 @@ class VppPapiProvider(object): 'enable_ip6': 1 if enable_ip6 else 0, }) - def gbp_endpoint_add_del(self, is_add, sw_if_index, addr, is_ip6, epg): - """ GBP endpoint Add/Del """ - return self.api(self.papi.gbp_endpoint_add_del, - {'is_add': is_add, - 'endpoint': { - 'is_ip6': is_ip6, - 'sw_if_index': sw_if_index, - 'address': addr, - 'epg_id': epg}}) + def gbp_endpoint_add(self, sw_if_index, ips, mac, epg): + """ GBP endpoint Add """ + return self.api(self.papi.gbp_endpoint_add, + {'endpoint': { + 'sw_if_index': sw_if_index, + 'ips': ips, + 'n_ips': len(ips), + 'mac': mac, + 'epg_id': epg}}) + + def gbp_endpoint_del(self, handle): + """ GBP endpoint Del """ + return self.api(self.papi.gbp_endpoint_del, + {'handle': handle}) def gbp_endpoint_dump(self): """ GBP endpoint Dump """ @@ -3479,7 +3484,7 @@ class VppPapiProvider(object): def gbp_subnet_add_del(self, is_add, table_id, is_internal, - addr, addr_len, + prefix, sw_if_index=0xffffffff, epg_id=0xffff, is_ip6=False): @@ -3491,8 +3496,7 @@ class VppPapiProvider(object): 'is_ip6': is_ip6, 'sw_if_index': sw_if_index, 'epg_id': epg_id, - 'address': addr, - 'address_length': addr_len, + 'prefix': prefix, 'table_id': table_id}}) def gbp_subnet_dump(self): |