summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-11 05:34:50 -0700
committerDamjan Marion <dmarion@me.com>2019-03-13 08:29:09 +0000
commit03982d89244ff96830edad2c194bcd31b7d70c52 (patch)
tree88fc87cfe53164f3f7ca5b3878dc2d356e5472a8 /test
parentec950c23a7e3ac7bd46653addc3cca294b2daa6a (diff)
FIB: path parsing, table-id not fib-index (VPP-1586)
Change-Id: Ib27952935393163eaabf005c69b1cbc2feca2b98 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_abf.py30
-rw-r--r--test/test_bier.py10
2 files changed, 33 insertions, 7 deletions
diff --git a/test/test_abf.py b/test/test_abf.py
index fb30fc3018c..55eb552803a 100644
--- a/test/test_abf.py
+++ b/test/test_abf.py
@@ -3,7 +3,7 @@
from framework import VppTestCase, VppTestRunner
from vpp_udp_encap import *
from vpp_ip import DpoProto
-from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable
+from vpp_ip_route import VppIpRoute, VppRoutePath, VppMplsLabel, VppIpTable
from scapy.packet import Raw
from scapy.layers.l2 import Ether, ARP
@@ -144,9 +144,9 @@ class TestAbf(VppTestCase):
def setUp(self):
super(TestAbf, self).setUp()
- self.create_pg_interfaces(range(4))
+ self.create_pg_interfaces(range(5))
- for i in self.pg_interfaces:
+ for i in self.pg_interfaces[:4]:
i.admin_up()
i.config_ip4()
i.resolve_arp()
@@ -266,6 +266,30 @@ class TestAbf(VppTestCase):
self.send_and_assert_no_replies(self.pg1, p_2 * 65, "Detached")
+ #
+ # Swap to route via a next-hop in the non-default table
+ #
+ table_20 = VppIpTable(self, 20)
+ table_20.add_vpp_config()
+
+ self.pg4.set_table_ip4(table_20.table_id)
+ self.pg4.admin_up()
+ self.pg4.config_ip4()
+ self.pg4.resolve_arp()
+
+ abf_13 = VppAbfPolicy(self, 13, acl_1,
+ [VppRoutePath(self.pg4.remote_ip4,
+ 0xffffffff,
+ nh_table_id=table_20.table_id)])
+ abf_13.add_vpp_config()
+ attach_5 = VppAbfAttach(self, 13, self.pg0.sw_if_index, 30)
+ attach_5.add_vpp_config()
+
+ self.send_and_expect(self.pg0, p_1*65, self.pg4)
+
+ self.pg4.unconfig_ip4()
+ self.pg4.set_table_ip4(0)
+
def test_abf6(self):
""" IPv6 ACL Based Forwarding
"""
diff --git a/test/test_bier.py b/test/test_bier.py
index 93f0e36b604..34e80224938 100644
--- a/test/test_bier.py
+++ b/test/test_bier.py
@@ -581,10 +581,12 @@ class TestBier(VppTestCase):
proto=DpoProto.DPO_PROTO_BIER,
nh_table_id=8)])
bier_route_1.add_vpp_config()
- bier_route_max = VppBierRoute(self, bti, max_bp,
- [VppRoutePath("0.0.0.0",
- 0xffffffff,
- nh_table_id=8)])
+ bier_route_max = VppBierRoute(
+ self, bti, max_bp,
+ [VppRoutePath("0.0.0.0",
+ 0xffffffff,
+ nh_table_id=8,
+ proto=DpoProto.DPO_PROTO_BIER)])
bier_route_max.add_vpp_config()
#