diff options
author | Neale Ranns <nranns@cisco.com> | 2017-01-26 01:18:23 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-02-20 09:54:49 +0000 |
commit | 5a8123bda0261158457e38bfb4922aa5961389ff (patch) | |
tree | df221814e21d30ea5d63620504c73e64371a5780 /test/test_gre.py | |
parent | 90c55724b583434957cf83555a084770f2efdd7a (diff) |
Python test IP and MPLS objects conform to infra.
Add IP[46] MFIB dump.
Change-Id: I4a2821f65e67a5416b291e4912c84f64989883b8
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_gre.py')
-rw-r--r-- | test/test_gre.py | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/test/test_gre.py b/test/test_gre.py index b13130447e3..89f39e4eb11 100644 --- a/test/test_gre.py +++ b/test/test_gre.py @@ -6,7 +6,7 @@ from logging import * from framework import VppTestCase, VppTestRunner from vpp_sub_interface import VppDot1QSubint from vpp_gre_interface import VppGreInterface -from vpp_ip_route import IpRoute, RoutePath +from vpp_ip_route import VppIpRoute, VppRoutePath from vpp_papi_provider import L2_VTR_OP from scapy.packet import Raw @@ -298,8 +298,9 @@ class TestGRE(VppTestCase): gre_if.admin_up() gre_if.config_ip4() - route_via_tun = IpRoute(self, "4.4.4.4", 32, - [RoutePath("0.0.0.0", gre_if.sw_if_index)]) + route_via_tun = VppIpRoute(self, "4.4.4.4", 32, + [VppRoutePath("0.0.0.0", + gre_if.sw_if_index)]) route_via_tun.add_vpp_config() @@ -321,9 +322,9 @@ class TestGRE(VppTestCase): # # Add a route that resolves the tunnel's destination # - route_tun_dst = IpRoute(self, "1.1.1.2", 32, - [RoutePath(self.pg0.remote_ip4, - self.pg0.sw_if_index)]) + route_tun_dst = VppIpRoute(self, "1.1.1.2", 32, + [VppRoutePath(self.pg0.remote_ip4, + self.pg0.sw_if_index)]) route_tun_dst.add_vpp_config() # @@ -453,17 +454,18 @@ class TestGRE(VppTestCase): # # Add a route via the tunnel - in the overlay # - route_via_tun = IpRoute(self, "9.9.9.9", 32, - [RoutePath("0.0.0.0", gre_if.sw_if_index)]) + route_via_tun = VppIpRoute(self, "9.9.9.9", 32, + [VppRoutePath("0.0.0.0", + gre_if.sw_if_index)]) route_via_tun.add_vpp_config() # # Add a route that resolves the tunnel's destination - in the # underlay table # - route_tun_dst = IpRoute(self, "2.2.2.2", 32, table_id=1, - paths=[RoutePath(self.pg1.remote_ip4, - self.pg1.sw_if_index)]) + route_tun_dst = VppIpRoute(self, "2.2.2.2", 32, table_id=1, + paths=[VppRoutePath(self.pg1.remote_ip4, + self.pg1.sw_if_index)]) route_tun_dst.add_vpp_config() # @@ -514,12 +516,12 @@ class TestGRE(VppTestCase): # # Add routes to resolve the tunnel destinations # - route_tun1_dst = IpRoute(self, "2.2.2.2", 32, - [RoutePath(self.pg0.remote_ip4, - self.pg0.sw_if_index)]) - route_tun2_dst = IpRoute(self, "2.2.2.3", 32, - [RoutePath(self.pg0.remote_ip4, - self.pg0.sw_if_index)]) + route_tun1_dst = VppIpRoute(self, "2.2.2.2", 32, + [VppRoutePath(self.pg0.remote_ip4, + self.pg0.sw_if_index)]) + route_tun2_dst = VppIpRoute(self, "2.2.2.3", 32, + [VppRoutePath(self.pg0.remote_ip4, + self.pg0.sw_if_index)]) route_tun1_dst.add_vpp_config() route_tun2_dst.add_vpp_config() |