summaryrefslogtreecommitdiffstats
path: root/test/test_l2bd_multi_instance.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_l2bd_multi_instance.py')
-rw-r--r--test/test_l2bd_multi_instance.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/test_l2bd_multi_instance.py b/test/test_l2bd_multi_instance.py
index cb00a4e0ecc..b51bb5e6c81 100644
--- a/test/test_l2bd_multi_instance.py
+++ b/test/test_l2bd_multi_instance.py
@@ -115,15 +115,6 @@ class TestL2bdMultiInst(VppTestCase):
for i in cls.pg_interfaces:
i.admin_up()
- # Create list of BDs
- cls.bd_list = list()
-
- # Create list of deleted BDs
- cls.bd_deleted_list = list()
-
- # Create list of pg_interfaces in BDs
- cls.pg_in_bd = list()
-
except Exception:
super(TestL2bdMultiInst, cls).tearDownClass()
raise
@@ -138,6 +129,14 @@ class TestL2bdMultiInst(VppTestCase):
"""
self.reset_packet_infos()
super(TestL2bdMultiInst, self).setUp()
+ # Create list of BDs
+ self.bd_list = []
+
+ # Create list of deleted BDs
+ self.bd_deleted_list = []
+
+ # Create list of pg_interfaces in BDs
+ self.pg_in_bd = []
def tearDown(self):
"""
@@ -406,12 +405,14 @@ class TestL2bdMultiInst(VppTestCase):
# Test 1
# self.vapi.cli("clear trace")
self.run_verify_test()
+ self.delete_bd(5)
def test_l2bd_inst_02(self):
""" L2BD Multi-instance test 2 - update data of 5 BDs
"""
# Config 2
# Update data of 5 BDs (disable learn, forward, flood, uu-flood)
+ self.create_bd_and_mac_learn(5)
self.set_bd_flags(self.bd_list[0], learn=False, forward=False,
flood=False, uu_flood=False)
self.set_bd_flags(self.bd_list[1], forward=False)
@@ -432,12 +433,14 @@ class TestL2bdMultiInst(VppTestCase):
flood=True, uu_flood=False)
self.verify_bd(self.bd_list[4], learn=False, forward=True,
flood=True, uu_flood=True)
+ self.delete_bd(5)
def test_l2bd_inst_03(self):
""" L2BD Multi-instance test 3 - delete 2 BDs
"""
# Config 3
# Delete 2 BDs
+ self.create_bd_and_mac_learn(5)
self.delete_bd(2)
# Verify 3
@@ -448,6 +451,7 @@ class TestL2bdMultiInst(VppTestCase):
# Test 3
self.run_verify_test()
+ self.delete_bd(3, 3)
def test_l2bd_inst_04(self):
""" L2BD Multi-instance test 4 - add 2 BDs
@@ -464,13 +468,14 @@ class TestL2bdMultiInst(VppTestCase):
# Test 4
# self.vapi.cli("clear trace")
self.run_verify_test()
+ self.delete_bd(2)
- @unittest.skipUnless(running_extended_tests, "part of extended tests")
def test_l2bd_inst_05(self):
""" L2BD Multi-instance test 5 - delete 5 BDs
"""
# Config 5
# Delete 5 BDs
+ self.create_bd_and_mac_learn(5)
self.delete_bd(5)
# Verify 5