aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_interface.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_interface.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_interface.py')
-rw-r--r--test/vpp_interface.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py
index c596ab5a..509ab952 100644
--- a/test/vpp_interface.py
+++ b/test/vpp_interface.py
@@ -131,6 +131,18 @@ class VppInterface(object):
self.test.vapi.sw_interface_add_del_address(
self.sw_if_index, addr, addr_len, is_ipv6=1)
+ def set_table_ip4(self, table_id):
+ """Set the interface in a IPv4 Table.
+ Must be called before configuring IP4 addresses"""
+ self.test.vapi.sw_interface_set_table(
+ self.sw_if_index, 0, table_id)
+
+ def set_table_ip6(self, table_id):
+ """Set the interface in a IPv6 Table.
+ Must be called before configuring IP6 addresses"""
+ self.test.vapi.sw_interface_set_table(
+ self.sw_if_index, 1, table_id)
+
def disable_ipv6_ra(self):
"""Configure IPv6 RA suppress on the VPP interface"""
self.test.vapi.sw_interface_ra_suppress(self.sw_if_index)
@@ -238,3 +250,8 @@ class VppInterface(object):
self.sub_if.append(sub_if)
else:
self.sub_if = sub_if
+
+ def enable_mpls(self):
+ """Enable MPLS on the VPP interface"""
+ self.test.vapi.sw_interface_enable_disable_mpls(
+ self.sw_if_index)