X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_vxlan6.py;h=1e382e349c724f6d12faf6e7613e14c13a966958;hb=097fa66b986f06281f603767d321ab13ab6c88c3;hp=4053fadff8bb5c474a44ead444eeca4251895b4b;hpb=39baa32186fd3e4b20d9f58afbbfe7b8daebed62;p=vpp.git 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):