summaryrefslogtreecommitdiffstats
path: root/test/test_vxlan_gbp.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/test_vxlan_gbp.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/test_vxlan_gbp.py')
-rw-r--r--test/test_vxlan_gbp.py32
1 files changed, 24 insertions, 8 deletions
diff --git a/test/test_vxlan_gbp.py b/test/test_vxlan_gbp.py
index 9abff19bb79..bd70eefa685 100644
--- a/test/test_vxlan_gbp.py
+++ b/test/test_vxlan_gbp.py
@@ -103,9 +103,16 @@ class TestVxlanGbp(VppTestCase):
register=False)
rip.add_vpp_config()
r = cls.vapi.vxlan_gbp_tunnel_add_del(
- cls.pg0.local_ip4,
- dest_ip4,
- vni=vni)
+ tunnel={
+ 'src': VppIpAddress(cls.pg0.local_ip4).encode(),
+ 'dst': VppIpAddress(dest_ip4).encode(),
+ 'vni': vni,
+ 'instance': INVALID_INDEX,
+ 'mcast_sw_if_index': INVALID_INDEX,
+ 'mode': 1,
+ },
+ is_add=1
+ )
cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index,
bd_id=vni)
@@ -139,13 +146,21 @@ class TestVxlanGbp(VppTestCase):
# pg1 into BD.
cls.single_tunnel_bd = 1
r = cls.vapi.vxlan_gbp_tunnel_add_del(
- VppIpAddress(cls.pg0.local_ip4).encode(),
- VppIpAddress(cls.pg0.remote_ip4).encode(),
- vni=cls.single_tunnel_bd)
+ tunnel={
+ 'src': VppIpAddress(cls.pg0.local_ip4).encode(),
+ 'dst': VppIpAddress(cls.pg0.remote_ip4).encode(),
+ 'vni': cls.single_tunnel_bd,
+ 'instance': INVALID_INDEX,
+ 'mcast_sw_if_index': INVALID_INDEX,
+ 'mode': 1,
+ },
+ is_add=1
+ )
cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index,
bd_id=cls.single_tunnel_bd)
cls.vapi.sw_interface_set_l2_bridge(
- rx_sw_if_index=cls.pg1.sw_if_index, bd_id=cls.single_tunnel_bd)
+ rx_sw_if_index=cls.pg1.sw_if_index,
+ bd_id=cls.single_tunnel_bd)
# Setup vni 2 to test multicast flooding
cls.n_ucast_tunnels = 2
@@ -154,7 +169,8 @@ class TestVxlanGbp(VppTestCase):
cls.create_vxlan_gbp_flood_test_bd(cls.ucast_flood_bd,
cls.n_ucast_tunnels)
cls.vapi.sw_interface_set_l2_bridge(
- rx_sw_if_index=cls.pg3.sw_if_index, bd_id=cls.ucast_flood_bd)
+ rx_sw_if_index=cls.pg3.sw_if_index,
+ bd_id=cls.ucast_flood_bd)
except Exception:
super(TestVxlanGbp, cls).tearDownClass()
raise