From f9342023c19887da656133e2688a90d70383b0c5 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 13 Oct 2017 02:43:33 -0700 Subject: Enforce FIB table creation before use last i the serise of the use of the FIB table create/delete API. VPP now forces the tables to have been explicitly creted before they are used. Change-Id: Ifde3b1bbb76697a01ab71bce4f5264e6d1725467 Signed-off-by: Neale Ranns --- test/test_srv6.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'test/test_srv6.py') diff --git a/test/test_srv6.py b/test/test_srv6.py index a31b30eb619..4c463808151 100644 --- a/test/test_srv6.py +++ b/test/test_srv6.py @@ -4,7 +4,7 @@ import unittest from socket import AF_INET6 from framework import VppTestCase, VppTestRunner -from vpp_ip_route import VppIpRoute, VppRoutePath, DpoProto +from vpp_ip_route import VppIpRoute, VppRoutePath, DpoProto, VppIpTable from vpp_srv6 import SRv6LocalSIDBehaviors, VppSRv6LocalSID, VppSRv6Policy, \ SRv6PolicyType, VppSRv6Steering, SRv6PolicySteeringTypes @@ -100,6 +100,19 @@ class TestSRv6(VppTestCase): # create 'count' pg interfaces self.create_pg_interfaces(range(count)) + # create all tables + self.tables = [] + ids = sorted(set(ipv4_table_id)) + for i in range(len(ids)): + if 0 != ids[i]: + self.tables.append(VppIpTable(self, ids[i])) + ids = sorted(set(ipv6_table_id)) + for i in range(len(ids)): + if 0 != ids[i]: + self.tables.append(VppIpTable(self, ids[i], is_ip6=1)) + for t in self.tables: + t.add_vpp_config() + # setup all interfaces for i in range(count): intf = self.pg_interfaces[i] @@ -124,8 +137,10 @@ class TestSRv6(VppTestCase): # AFAIK they cannot be deleted for i in self.pg_interfaces: self.logger.debug("Tear down interface %s" % (i.name)) - i.admin_down() i.unconfig() + i.set_table_ip4(0) + i.set_table_ip6(0) + i.admin_down() def test_SRv6_T_Encaps(self): """ Test SRv6 Transit.Encaps behavior for IPv6. -- cgit 1.2.3-korg