summaryrefslogtreecommitdiffstats
path: root/test/vpp_vxlan_gbp_tunnel.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-27 05:06:47 -0700
committerNeale Ranns <nranns@cisco.com>2019-03-27 13:40:50 +0000
commit4dd4cf4f9c02953f8ce7df0b2912e4da7c6786ed (patch)
treea576b3aec3b37fdc32b132ac554bbf7b20697559 /test/vpp_vxlan_gbp_tunnel.py
parentd709cbcb1ef80633af657c5427608831e5bbd919 (diff)
GBP: fixes for l3-out routing
Change-Id: I4d73b712da911588d511a8401b73cdc3c66346fe Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_vxlan_gbp_tunnel.py')
-rw-r--r--test/vpp_vxlan_gbp_tunnel.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/vpp_vxlan_gbp_tunnel.py b/test/vpp_vxlan_gbp_tunnel.py
index 73f951718a4..efeb4f960db 100644
--- a/test/vpp_vxlan_gbp_tunnel.py
+++ b/test/vpp_vxlan_gbp_tunnel.py
@@ -1,6 +1,7 @@
from vpp_interface import VppInterface
from vpp_ip import VppIpAddress
+from vpp_papi import VppEnum
INDEX_INVALID = 0xffffffff
@@ -24,13 +25,18 @@ class VppVxlanGbpTunnel(VppInterface):
VPP VXLAN GBP interface
"""
- def __init__(self, test, src, dst, vni, mcast_itf=None):
+ def __init__(self, test, src, dst, vni, mcast_itf=None, mode=None):
""" Create VXLAN-GBP Tunnel interface """
super(VppVxlanGbpTunnel, self).__init__(test)
self.src = VppIpAddress(src)
self.dst = VppIpAddress(dst)
self.vni = vni
self.mcast_itf = mcast_itf
+ if not mode:
+ self.mode = (VppEnum.vl_api_vxlan_gbp_api_tunnel_mode_t.
+ VXLAN_GBP_API_TUNNEL_MODE_L2)
+ else:
+ self.mode = mode
def add_vpp_config(self):
mcast_sw_if_index = INDEX_INVALID
@@ -39,6 +45,7 @@ class VppVxlanGbpTunnel(VppInterface):
reply = self.test.vapi.vxlan_gbp_tunnel_add_del(
self.src.encode(),
self.dst.encode(),
+ mode=self.mode,
vni=self.vni,
mcast_sw_if_index=mcast_sw_if_index)
self.set_sw_if_index(reply.sw_if_index)