diff options
Diffstat (limited to 'test/test_vxlan6.py')
-rw-r--r-- | test/test_vxlan6.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/test_vxlan6.py b/test/test_vxlan6.py index 4053fadff8b..1e382e349c7 100644 --- a/test/test_vxlan6.py +++ b/test/test_vxlan6.py @@ -9,6 +9,8 @@ from scapy.layers.l2 import Ether from scapy.layers.inet6 import IPv6, UDP from scapy.layers.vxlan import VXLAN from scapy.utils import atol +from vpp_ip_route import VppIpRoute, VppRoutePath +from vpp_ip import INVALID_INDEX class TestVxlan6(BridgeDomain, VppTestCase): @@ -85,18 +87,17 @@ class TestVxlan6(BridgeDomain, VppTestCase): # Create 10 ucast vxlan tunnels under bd start = 10 end = start + n_ucast_tunnels - next_hop = cls.pg0.remote_ip6n for dest_ip6 in cls.ip_range(start, end): dest_ip6n = socket.inet_pton(socket.AF_INET6, dest_ip6) # add host route so dest ip will not be resolved - cls.vapi.ip_add_del_route(dst_address=dest_ip6n, - dst_address_length=128, - next_hop_address=next_hop, is_ipv6=1) + rip = VppIpRoute(cls, dest_ip6, 128, + [VppRoutePath(cls.pg0.remote_ip6, INVALID_INDEX)], + register=False) + rip.add_vpp_config() r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip6n, dst_address=dest_ip6n, is_ipv6=1, vni=vni) - cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, - bd_id=vni) + cls.vapi.sw_interface_set_l2_bridge(r.sw_if_index, bd_id=vni) @classmethod def add_mcast_tunnels_load(cls): |