aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-11-05 16:26:46 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-11-07 16:13:42 +0000
commit810086d8fd08445919ae03bf36161037e53a712a (patch)
tree76a91d3ed49759ef3adae32066f9dcedd75df889 /test/vpp_papi_provider.py
parent595992c5c3b5abbdb7e90e61acbee212f25ad59f (diff)
UDP Encapsulation.
A UDP-encap object that particiapates in the FIB graph and contributes DPO to teh output chain. It thereofre resembles a tunnel but without the interface. FIB paths (and henace routes) can then be created to egress through the UDP-encap. Said routes can have MPLS labels, hence this also allows MPLSoUPD. Encap is uni-directional. For decap, one still registers with the UDP port dispatcher. Change-Id: I23bd345523b20789a1de1b02022ea1148ca50797 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 468cf83d57b..31d7ac48d1f 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -735,6 +735,7 @@ class VppPapiProvider(object):
next_hop_n_out_labels=0,
next_hop_out_label_stack=[],
next_hop_via_label=MPLS_LABEL_INVALID,
+ next_hop_id=0xFFFFFFFF,
is_resolve_host=0,
is_resolve_attached=0,
classify_table_index=0xFFFFFFFF,
@@ -747,6 +748,7 @@ class VppPapiProvider(object):
is_classify=0,
is_multipath=0,
is_l2_bridged=0,
+ is_udp_encap=0,
is_source_lookup=0):
"""
@@ -790,9 +792,11 @@ class VppPapiProvider(object):
'is_resolve_attached': is_resolve_attached,
'is_l2_bridged': is_l2_bridged,
'is_source_lookup': is_source_lookup,
+ 'is_udp_encap': is_udp_encap,
'next_hop_weight': next_hop_weight,
'dst_address_length': dst_address_length,
'dst_address': dst_address,
+ 'next_hop_id': next_hop_id,
'next_hop_address': next_hop_address,
'next_hop_n_out_labels': next_hop_n_out_labels,
'next_hop_via_label': next_hop_via_label,
@@ -980,6 +984,41 @@ class VppPapiProvider(object):
'outer_fib_id': outer_fib_id}
)
+ def udp_encap_add_del(self,
+ id,
+ src_ip,
+ dst_ip,
+ src_port,
+ dst_port,
+ table_id=0,
+ is_add=1,
+ is_ip6=0):
+ """ Add a GRE tunnel
+ :param id: user provided ID
+ :param src_ip:
+ :param dst_ip:
+ :param src_port:
+ :param dst_port:
+ :param outer_fib_id: (Default value = 0)
+ :param is_add: (Default value = 1)
+ :param is_ipv6: (Default value = 0)
+ """
+
+ return self.api(
+ self.papi.udp_encap_add_del,
+ {'id': id,
+ 'is_add': is_add,
+ 'is_ip6': is_ip6,
+ 'src_ip': src_ip,
+ 'dst_ip': dst_ip,
+ 'src_port': src_port,
+ 'dst_port': dst_port,
+ 'table_id': table_id}
+ )
+
+ def udp_encap_dump(self):
+ return self.api(self.papi.udp_encap_dump, {})
+
def mpls_fib_dump(self):
return self.api(self.papi.mpls_fib_dump, {})