summaryrefslogtreecommitdiffstats
path: root/test/vpp_vxlan_gbp_tunnel.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-06-15 20:31:31 -0400
committerNeale Ranns <nranns@cisco.com>2019-06-25 12:37:13 +0000
commit1b534f5a4ad33f78159113f5a922465df6b32cef (patch)
treeddc769cdfa278979f8608211a9a217be674707e2 /test/vpp_vxlan_gbp_tunnel.py
parent464e1dcd6b219038c28ee8c71cc7247151a0d18c (diff)
tests: fix test_gbp.py.
A number of VppGbpContractRules were missing the hash_mode_t and were being replaced by an optional kwarg. Type: fix Change-Id: I6ca03c93b69e4355c237a6c9402e1e178b701b21 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/vpp_vxlan_gbp_tunnel.py')
-rw-r--r--test/vpp_vxlan_gbp_tunnel.py34
1 files changed, 24 insertions, 10 deletions
diff --git a/test/vpp_vxlan_gbp_tunnel.py b/test/vpp_vxlan_gbp_tunnel.py
index 47817ed168f..5352d6ebf31 100644
--- a/test/vpp_vxlan_gbp_tunnel.py
+++ b/test/vpp_vxlan_gbp_tunnel.py
@@ -25,13 +25,17 @@ class VppVxlanGbpTunnel(VppInterface):
VPP VXLAN GBP interface
"""
- def __init__(self, test, src, dst, vni, mcast_itf=None, mode=None):
+ def __init__(self, test, src, dst, vni, mcast_itf=None, mode=None,
+ is_ipv6=None, encap_table_id=None, instance=0xffffffff):
""" 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
+ self.ipv6 = is_ipv6
+ self.encap_table_id = encap_table_id
+ self.instance = instance
if not mode:
self.mode = (VppEnum.vl_api_vxlan_gbp_api_tunnel_mode_t.
VXLAN_GBP_API_TUNNEL_MODE_L2)
@@ -43,11 +47,16 @@ class VppVxlanGbpTunnel(VppInterface):
if (self.mcast_itf):
mcast_sw_if_index = self.mcast_itf.sw_if_index
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)
+ is_add=1,
+ tunnel={
+ 'src': self.src.encode(),
+ 'dst': self.dst.encode(),
+ 'mode': self.mode,
+ 'vni': self.vni,
+ 'mcast_sw_if_index': mcast_sw_if_index,
+ 'encap_table_id': self.encap_table_id,
+ 'instance': self.instance
+ })
self.set_sw_if_index(reply.sw_if_index)
self._test.registry.register(self, self._test.logger)
@@ -56,11 +65,16 @@ class VppVxlanGbpTunnel(VppInterface):
if (self.mcast_itf):
mcast_sw_if_index = self.mcast_itf.sw_if_index
self.test.vapi.vxlan_gbp_tunnel_add_del(
- self.src.encode(),
- self.dst.encode(),
- vni=self.vni,
is_add=0,
- mcast_sw_if_index=mcast_sw_if_index)
+ tunnel={
+ 'src': self.src.encode(),
+ 'dst': self.dst.encode(),
+ 'mode': self.mode,
+ 'vni': self.vni,
+ 'mcast_sw_if_index': mcast_sw_if_index,
+ 'encap_table_id': self.encap_table_id,
+ 'instance': self.instance,
+ })
def query_vpp_config(self):
return (INDEX_INVALID != find_vxlan_gbp_tunnel(self._test,