aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-02-05 01:13:38 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-09 13:17:54 +0000
commitbc27d1be24815e1371dcce3bff2d3075a532acba (patch)
treec17db02fefb19ce593de5ddb2444f4c97e074492 /test/vpp_papi_provider.py
parentef56fae51a8683ec6ceeb01e1374cde2ba30c1e5 (diff)
GBP plugin
Group Base Policy (GBP) defines: - endpoints: typically a VM or container that is connected to the virtual switch/router (i.e. to VPP) - endpoint-group: (EPG) a collection of endpoints - policy: rules determining which traffic can pass between EPGs a.k.a a 'contract' Here, policy is implemented via an ACL. EPG classification for transit packets is determined by: - source EPG: from the packet's input interface - destination EPG: from the packet's destination IP address. Change-Id: I7b983844826b5fc3d49e21353ebda9df9b224e25 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index a10b777a13a..15a566c5bc7 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -3162,3 +3162,30 @@ class VppPapiProvider(object):
def ip_reassembly_get(self, is_ip6=0):
""" Get IP reassembly parameters """
return self.api(self.papi.ip_reassembly_get, {'is_ip6': is_ip6})
+
+ 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_dump(self):
+ """ GBP endpoint Dump """
+ return self.api(self.papi.gbp_endpoint_dump, {})
+
+ def gbp_contract_add_del(self, is_add, src_epg, dst_epg, acl_index):
+ """ GBP contract Add/Del """
+ return self.api(self.papi.gbp_contract_add_del,
+ {'is_add': is_add,
+ 'contract': {
+ 'acl_index': acl_index,
+ 'src_epg': src_epg,
+ 'dst_epg': dst_epg}})
+
+ def gbp_contract_dump(self):
+ """ GBP contract Dump """
+ return self.api(self.papi.gbp_contract_dump, {})