Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
dhcp: disable extraneous vlib_log spew
[vpp.git]
/
test
/
test_vxlan6.py
diff --git
a/test/test_vxlan6.py
b/test/test_vxlan6.py
index
4053fad
..
b1fda50
100644
(file)
--- a/
test/test_vxlan6.py
+++ b/
test/test_vxlan6.py
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
+#!/usr/bin/env python
3
import socket
import unittest
import socket
import unittest
@@
-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 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):
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
# 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
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)
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):
@classmethod
def add_mcast_tunnels_load(cls):