X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_udp.py;fp=test%2Ftest_udp.py;h=fc77434184c2e3eadeceb239d4d394847fd77efd;hb=097fa66b986f06281f603767d321ab13ab6c88c3;hp=c714f25e27f60a4bc38530ac5569dfa1aa18d208;hpb=39baa32186fd3e4b20d9f58afbbfe7b8daebed62;p=vpp.git 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,