summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2017-06-20 14:00:26 +0200
committerJohn Lo <loj@cisco.com>2017-08-01 14:44:13 +0000
commit15ac81c16fba83033090299413a3a2dbb848a0f9 (patch)
treeca9617e0faa21847be31e47c0c65ffc0cacf47eb /test/vpp_papi_provider.py
parent5b311202b82a827c712d2cb7604c56049266adc9 (diff)
P2P Ethernet
Change-Id: Idb97e573961b3bc2acdeef77582314590795f8c3 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 204d9e31f7d..801a6c2dd4d 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -601,6 +601,19 @@ class VppPapiProvider(object):
'outer_vlan_id': outer_vlan,
'inner_vlan_id': inner_vlan})
+ def create_p2pethernet_subif(self, sw_if_index, remote_mac, subif_id):
+ """Create p2p ethernet subinterface
+
+ :param sw_if_index: main (parent) interface
+ :param remote_mac: client (remote) mac address
+
+ """
+ return self.api(
+ self.papi.p2p_ethernet_add,
+ {'parent_if_index': sw_if_index,
+ 'remote_mac': remote_mac,
+ 'subif_id': subif_id})
+
def delete_subif(self, sw_if_index):
"""Delete subinterface
@@ -609,6 +622,18 @@ class VppPapiProvider(object):
return self.api(self.papi.delete_subif,
{'sw_if_index': sw_if_index})
+ def delete_p2pethernet_subif(self, sw_if_index, remote_mac):
+ """Delete p2p ethernet subinterface
+
+ :param sw_if_index: main (parent) interface
+ :param remote_mac: client (remote) mac address
+
+ """
+ return self.api(
+ self.papi.p2p_ethernet_del,
+ {'parent_if_index': sw_if_index,
+ 'remote_mac': remote_mac})
+
def create_vlan_subif(self, sw_if_index, vlan):
"""