summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2016-11-01 10:05:08 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2016-11-01 19:26:24 +0000
commit8fe8cc21d1e389d8e971a303e53c9e703aaaa0e0 (patch)
treedd42f4a0e7242ba9b2804dc2dd5619d2b837c13f /test/vpp_papi_provider.py
parent3b906b0d9b93a892831ce4d54d1d7ec3956ce2b4 (diff)
MPLS Exp-null Tests
Add some 'make test' unit tests for MPLS explicit NULL label handling. Fix the stacking of the MPLS load-balance result form the lookup onto the IPx lookup object. Change-Id: I890d1221b8e3dea99bcc714ed9d0154a5f602c52 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 261a0f4aa4b..f0eb410bf30 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -106,6 +106,18 @@ class VppPapiProvider(object):
args = (0, b'')
return self.api(vpp_papi.sw_interface_dump, args)
+ def sw_interface_set_table(self, sw_if_index, is_ipv6, table_id):
+ """
+ Set the IPvX Table-id for the Interface
+
+ :param sw_if_index:
+ :param is_ipv6:
+ :param table_id:
+
+ """
+ return self.api(vpp_papi.sw_interface_set_table,
+ (sw_if_index, is_ipv6, table_id))
+
def sw_interface_add_del_address(self, sw_if_index, addr, addr_len,
is_ipv6=0, is_add=1, del_all=0):
"""
@@ -121,6 +133,17 @@ class VppPapiProvider(object):
return self.api(vpp_papi.sw_interface_add_del_address,
(sw_if_index, is_add, is_ipv6, del_all, addr_len, addr))
+ def sw_interface_enable_disable_mpls(self, sw_if_index,
+ is_enable=1):
+ """
+ Enable/Disable MPLS on the interface
+ :param sw_if_index:
+ :param is_enable: (Default value = 1)
+
+ """
+ return self.api(vpp_papi.sw_interface_set_mpls_enable,
+ (sw_if_index, is_enable))
+
def sw_interface_ra_suppress(self, sw_if_index):
suppress = 1
managed = 0