summaryrefslogtreecommitdiffstats
path: root/test/test_udp.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_udp.py')
-rw-r--r--test/test_udp.py65
1 files changed, 35 insertions, 30 deletions
diff --git a/test/test_udp.py b/test/test_udp.py
index c714f25e27f..fc77434184c 100644
--- a/test/test_udp.py
+++ b/test/test_udp.py
@@ -1,8 +1,10 @@
#!/usr/bin/env python
import unittest
from framework import VppTestCase, VppTestRunner
+
from vpp_udp_encap import find_udp_encap, VppUdpEncap
-from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable, VppMplsLabel
+from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable, VppMplsLabel, \
+ FibPathType
from scapy.packet import Raw
from scapy.layers.l2 import Ether
@@ -131,32 +133,34 @@ class TestUdpEncap(VppTestCase):
#
# Routes via each UDP encap object - all combinations of v4 and v6.
#
- route_4o4 = VppIpRoute(self, "1.1.0.1", 32,
- [VppRoutePath("0.0.0.0",
- 0xFFFFFFFF,
- is_udp_encap=1,
- next_hop_id=udp_encap_0.id)])
- route_4o6 = VppIpRoute(self, "1.1.2.1", 32,
- [VppRoutePath("0.0.0.0",
- 0xFFFFFFFF,
- is_udp_encap=1,
- next_hop_id=udp_encap_2.id)])
- route_6o4 = VppIpRoute(self, "2001::1", 128,
- [VppRoutePath("0.0.0.0",
- 0xFFFFFFFF,
- is_udp_encap=1,
- next_hop_id=udp_encap_1.id)],
- is_ip6=1)
- route_6o6 = VppIpRoute(self, "2001::3", 128,
- [VppRoutePath("0.0.0.0",
- 0xFFFFFFFF,
- is_udp_encap=1,
- next_hop_id=udp_encap_3.id)],
- is_ip6=1)
- route_4o4.add_vpp_config()
+ route_4o4 = VppIpRoute(
+ self, "1.1.0.1", 32,
+ [VppRoutePath("0.0.0.0",
+ 0xFFFFFFFF,
+ type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP,
+ next_hop_id=udp_encap_0.id)])
+ route_4o6 = VppIpRoute(
+ self, "1.1.2.1", 32,
+ [VppRoutePath("0.0.0.0",
+ 0xFFFFFFFF,
+ type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP,
+ next_hop_id=udp_encap_2.id)])
+ route_6o4 = VppIpRoute(
+ self, "2001::1", 128,
+ [VppRoutePath("0.0.0.0",
+ 0xFFFFFFFF,
+ type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP,
+ next_hop_id=udp_encap_1.id)])
+ route_6o6 = VppIpRoute(
+ self, "2001::3", 128,
+ [VppRoutePath("0.0.0.0",
+ 0xFFFFFFFF,
+ type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP,
+ next_hop_id=udp_encap_3.id)])
route_4o6.add_vpp_config()
route_6o6.add_vpp_config()
route_6o4.add_vpp_config()
+ route_4o4.add_vpp_config()
#
# 4o4 encap
@@ -222,12 +226,13 @@ class TestUdpEncap(VppTestCase):
# A route with an output label
# the TTL of the inner packet is decremented on LSP ingress
#
- route_4oMPLSo4 = VppIpRoute(self, "1.1.2.22", 32,
- [VppRoutePath("0.0.0.0",
- 0xFFFFFFFF,
- is_udp_encap=1,
- next_hop_id=1,
- labels=[VppMplsLabel(66)])])
+ route_4oMPLSo4 = VppIpRoute(
+ self, "1.1.2.22", 32,
+ [VppRoutePath("0.0.0.0",
+ 0xFFFFFFFF,
+ type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP,
+ next_hop_id=1,
+ labels=[VppMplsLabel(66)])])
route_4oMPLSo4.add_vpp_config()
p_4omo4 = (Ether(src=self.pg0.remote_mac,