Tests Cleanup: Fix missing calls to setUpClass/tearDownClass. 30/18230/4
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Wed, 13 Mar 2019 02:23:27 +0000 (19:23 -0700)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 10 Apr 2019 14:37:40 +0000 (14:37 +0000)
Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/

Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
68 files changed:
test/remote_test.py
test/template_ipsec.py
test/test_abf.py
test/test_acl_plugin.py
test/test_acl_plugin_l2l3.py
test/test_acl_plugin_macip.py
test/test_bihash.py
test/test_bond.py
test/test_classifier.py
test/test_classifier_ip6.py
test/test_classify_l2_acl.py
test/test_dhcp.py
test/test_dhcp6.py
test/test_dvr.py
test/test_fib.py
test/test_gbp.py
test/test_gre.py
test/test_gtpu.py
test/test_igmp.py
test/test_interface_crud.py
test/test_ip4.py
test/test_ip4_irb.py
test/test_ip4_vrf_multi_instance.py
test/test_ip6.py
test/test_ip6_vrf_multi_instance.py
test/test_ip_mcast.py
test/test_ipip.py
test/test_ipsec_ah.py
test/test_ipsec_api.py
test/test_ipsec_esp.py
test/test_ipsec_nat.py
test/test_ipsec_tun_if_esp.py
test/test_l2_fib.py
test/test_l2_flood.py
test/test_l2bd.py
test/test_l2bd_arp_term.py
test/test_l2bd_multi_instance.py
test/test_l2xc.py
test/test_l2xc_multi_instance.py
test/test_lb.py
test/test_lisp.py
test/test_map.py
test/test_mpls.py
test/test_mtu.py
test/test_nat.py
test/test_neighbor.py
test/test_p2p_ethernet.py
test/test_ping.py
test/test_pipe.py
test/test_pppoe.py
test/test_qos.py
test/test_reassembly.py
test/test_sctp.py
test/test_session.py
test/test_sixrd.py
test/test_srmpls.py
test/test_srv6.py
test/test_srv6_ad.py
test/test_srv6_as.py
test/test_string.py
test/test_svs.py
test/test_syslog.py
test/test_tcp.py
test/test_udp.py
test/test_vhost.py
test/test_vtr.py
test/test_vxlan.py
test/test_vxlan_gbp.py

index 0a6c320..21913b6 100644 (file)
@@ -401,6 +401,10 @@ class RemoteVppTestCase(VppTestCase):
         super(RemoteVppTestCase, cls).setUpClass()
         os.environ = orig_env
 
+    @classmethod
+    def tearDownClass(cls):
+        super(RemoteVppTestCase, cls).tearDownClass()
+
     @unittest.skip("Empty test")
     def emptyTest(self):
         """ Do nothing """
index 36e8da6..e6f1d24 100644 (file)
@@ -151,6 +151,17 @@ class TemplateIpsec(VppTestCase):
         """ empty method to be overloaded when necessary """
         pass
 
+    @classmethod
+    def setUpClass(cls):
+        super(TemplateIpsec, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TemplateIpsec, cls).tearDownClass()
+
+    def setUp(self):
+        super(TemplateIpsec, self).setUp()
+
     def setup_params(self):
         self.ipv4_params = IPsecIPv4Params()
         self.ipv6_params = IPsecIPv6Params()
index e2f9745..1de36c9 100644 (file)
@@ -135,6 +135,14 @@ class VppAbfAttach(VppObject):
 class TestAbf(VppTestCase):
     """ ABF Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestAbf, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestAbf, cls).tearDownClass()
+
     def setUp(self):
         super(TestAbf, self).setUp()
 
index 38c8d2c..772b5bb 100644 (file)
@@ -144,6 +144,10 @@ class TestACLplugin(VppTestCase):
             super(TestACLplugin, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestACLplugin, cls).tearDownClass()
+
     def setUp(self):
         super(TestACLplugin, self).setUp()
         self.reset_packet_infos()
index 0c846e7..7f54b05 100644 (file)
@@ -104,6 +104,10 @@ class TestACLpluginL2L3(VppTestCase):
         cls.pg0.remote_hosts = cls.loop0.remote_hosts[:half]
         cls.pg1.remote_hosts = cls.loop0.remote_hosts[half:]
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestACLpluginL2L3, cls).tearDownClass()
+
     def tearDown(self):
         """Run standard test teardown and log ``show l2patch``,
         ``show l2fib verbose``,``show bridge-domain <bd_id> detail``,
index 2291462..fe34cd0 100644 (file)
@@ -151,6 +151,10 @@ class MethodHolder(VppTestCase):
             super(MethodHolder, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(MethodHolder, cls).tearDownClass()
+
     def setUp(self):
         super(MethodHolder, self).setUp()
         self.reset_packet_infos()
@@ -708,6 +712,14 @@ class MethodHolder(VppTestCase):
 class TestMACIP_IP4(MethodHolder):
     """MACIP with IP4 traffic"""
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMACIP_IP4, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMACIP_IP4, cls).tearDownClass()
+
     def test_acl_bridged_ip4_exactMAC_exactIP(self):
         """ IP4 MACIP exactMAC|exactIP ACL bridged traffic
         """
@@ -842,6 +854,14 @@ class TestMACIP_IP4(MethodHolder):
 class TestMACIP_IP6(MethodHolder):
     """MACIP with IP6 traffic"""
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMACIP_IP6, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMACIP_IP6, cls).tearDownClass()
+
     def test_acl_bridged_ip6_exactMAC_exactIP(self):
         """ IP6 MACIP exactMAC|exactIP ACL bridged traffic
         """
@@ -980,6 +1000,14 @@ class TestMACIP_IP6(MethodHolder):
 class TestMACIP(MethodHolder):
     """MACIP Tests"""
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMACIP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMACIP, cls).tearDownClass()
+
     def test_acl_1_2(self):
         """ MACIP ACL with 2 entries
         """
@@ -1156,6 +1184,14 @@ class TestMACIP(MethodHolder):
 class TestACL_dot1q_bridged(MethodHolder):
     """ACL on dot1q bridged subinterfaces Tests"""
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestACL_dot1q_bridged, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestACL_dot1q_bridged, cls).tearDownClass()
+
     def test_acl_bridged_ip4_subif_dot1q(self):
         """ IP4 ACL SubIf Dot1Q bridged traffic"""
         self.run_traffic(self.EXACT_MAC, self.EXACT_IP, self.BRIDGED,
@@ -1170,6 +1206,14 @@ class TestACL_dot1q_bridged(MethodHolder):
 class TestACL_dot1ad_bridged(MethodHolder):
     """ACL on dot1ad bridged subinterfaces Tests"""
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestACL_dot1ad_bridged, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestACL_dot1ad_bridged, cls).tearDownClass()
+
     def test_acl_bridged_ip4_subif_dot1ad(self):
         """ IP4 ACL SubIf Dot1AD bridged traffic"""
         self.run_traffic(self.EXACT_MAC, self.EXACT_IP, self.BRIDGED,
@@ -1184,6 +1228,14 @@ class TestACL_dot1ad_bridged(MethodHolder):
 class TestACL_dot1q_routed(MethodHolder):
     """ACL on dot1q routed subinterfaces Tests"""
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestACL_dot1q_routed, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestACL_dot1q_routed, cls).tearDownClass()
+
     def test_acl_routed_ip4_subif_dot1q(self):
         """ IP4 ACL SubIf Dot1Q routed traffic"""
         self.run_traffic(self.EXACT_MAC, self.EXACT_IP, self.ROUTED,
@@ -1210,6 +1262,14 @@ class TestACL_dot1q_routed(MethodHolder):
 class TestACL_dot1ad_routed(MethodHolder):
     """ACL on dot1ad routed subinterfaces Tests"""
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestACL_dot1ad_routed, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestACL_dot1ad_routed, cls).tearDownClass()
+
     def test_acl_routed_ip6_subif_dot1ad(self):
         """ IP6 ACL SubIf Dot1AD routed traffic"""
         self.run_traffic(self.EXACT_MAC, self.EXACT_IP, self.ROUTED,
index 6ccf6c2..e225604 100644 (file)
@@ -13,6 +13,10 @@ class TestBihash(VppTestCase):
     def setUpClass(cls):
         super(TestBihash, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestBihash, cls).tearDownClass()
+
     def setUp(self):
         super(TestBihash, self).setUp()
 
index 533038e..a888993 100644 (file)
@@ -31,6 +31,10 @@ class TestBondInterface(VppTestCase):
         for i in cls.pg_interfaces:
             i.admin_up()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestBondInterface, cls).tearDownClass()
+
     def setUp(self):
         super(TestBondInterface, self).setUp()
 
index 5585ac0..5144901 100644 (file)
@@ -25,6 +25,10 @@ class TestClassifier(VppTestCase):
         super(TestClassifier, cls).setUpClass()
         cls.acl_active_table = ''
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifier, cls).tearDownClass()
+
     def setUp(self):
         """
         Perform test setup before test case.
@@ -323,6 +327,14 @@ class TestClassifier(VppTestCase):
 class TestClassifierIP(TestClassifier):
     """ Classifier IP Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierIP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierIP, cls).tearDownClass()
+
     def test_iacl_src_ip(self):
         """ Source IP iACL test
 
@@ -419,6 +431,14 @@ class TestClassifierIP(TestClassifier):
 class TestClassifierUDP(TestClassifier):
     """ Classifier UDP proto Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierUDP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierUDP, cls).tearDownClass()
+
     def test_iacl_proto_udp(self):
         """ UDP protocol iACL test
 
@@ -559,6 +579,14 @@ class TestClassifierUDP(TestClassifier):
 class TestClassifierTCP(TestClassifier):
     """ Classifier TCP proto Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierTCP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierTCP, cls).tearDownClass()
+
     def test_iacl_proto_tcp(self):
         """ TCP protocol iACL test
 
@@ -700,6 +728,14 @@ class TestClassifierTCP(TestClassifier):
 class TestClassifierIPOut(TestClassifier):
     """ Classifier output IP Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierIPOut, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierIPOut, cls).tearDownClass()
+
     def test_acl_ip_out(self):
         """ Output IP ACL test
 
@@ -735,6 +771,14 @@ class TestClassifierIPOut(TestClassifier):
 class TestClassifierMAC(TestClassifier):
     """ Classifier MAC Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierMAC, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierMAC, cls).tearDownClass()
+
     def test_acl_mac(self):
         """ MAC ACL test
 
@@ -770,6 +814,14 @@ class TestClassifierMAC(TestClassifier):
 class TestClassifierPBR(TestClassifier):
     """ Classifier PBR Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierPBR, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierPBR, cls).tearDownClass()
+
     def test_acl_pbr(self):
         """ IP PBR test
 
index 2b9b142..6725f61 100644 (file)
@@ -26,6 +26,10 @@ class TestClassifier(VppTestCase):
         super(TestClassifier, cls).setUpClass()
         cls.acl_active_table = ''
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifier, cls).tearDownClass()
+
     def setUp(self):
         """
         Perform test setup before test case.
@@ -288,6 +292,14 @@ class TestClassifier(VppTestCase):
 class TestClassifierIP6(TestClassifier):
     """ Classifier IP6 Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierIP6, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierIP6, cls).tearDownClass()
+
     def test_iacl_src_ip(self):
         """ Source IP6 iACL test
 
@@ -389,6 +401,14 @@ class TestClassifierIP6(TestClassifier):
 class TestClassifierIP6UDP(TestClassifier):
     """ Classifier IP6 UDP proto Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierIP6UDP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierIP6UDP, cls).tearDownClass()
+
     def test_iacl_proto_udp(self):
         """ IP6 UDP protocol iACL test
 
@@ -524,6 +544,14 @@ class TestClassifierIP6UDP(TestClassifier):
 class TestClassifierIP6TCP(TestClassifier):
     """ Classifier IP6 TCP proto Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierIP6TCP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierIP6TCP, cls).tearDownClass()
+
     def test_iacl_proto_tcp(self):
         """ IP6 TCP protocol iACL test
 
@@ -661,6 +689,14 @@ class TestClassifierIP6TCP(TestClassifier):
 class TestClassifierIP6Out(TestClassifier):
     """ Classifier output IP6 Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierIP6Out, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierIP6Out, cls).tearDownClass()
+
     def test_acl_ip_out(self):
         """ Output IP6 ACL test
 
@@ -698,6 +734,14 @@ class TestClassifierIP6Out(TestClassifier):
 class TestClassifierIP6MAC(TestClassifier):
     """ Classifier IP6 MAC Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestClassifierIP6MAC, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifierIP6MAC, cls).tearDownClass()
+
     def test_acl_mac(self):
         """ IP6 MAC iACL test
 
index fddaa0f..fb9e03b 100644 (file)
@@ -132,6 +132,10 @@ class TestClassifyAcl(VppTestCase):
             super(TestClassifyAcl, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestClassifyAcl, cls).tearDownClass()
+
     def setUp(self):
         super(TestClassifyAcl, self).setUp()
 
index 62db662..bdc5df7 100644 (file)
@@ -31,6 +31,14 @@ DHCP6_SERVER_PORT = 546
 class TestDHCP(VppTestCase):
     """ DHCP Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestDHCP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDHCP, cls).tearDownClass()
+
     def setUp(self):
         super(TestDHCP, self).setUp()
 
index dcf02fa..e017fee 100644 (file)
@@ -24,6 +24,10 @@ class TestDHCPv6DataPlane(VppTestCase):
     def setUpClass(cls):
         super(TestDHCPv6DataPlane, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDHCPv6DataPlane, cls).tearDownClass()
+
     def setUp(self):
         super(TestDHCPv6DataPlane, self).setUp()
 
@@ -205,6 +209,10 @@ class TestDHCPv6IANAControlPlane(VppTestCase):
     def setUpClass(cls):
         super(TestDHCPv6IANAControlPlane, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDHCPv6IANAControlPlane, cls).tearDownClass()
+
     def setUp(self):
         super(TestDHCPv6IANAControlPlane, self).setUp()
 
@@ -452,6 +460,10 @@ class TestDHCPv6PDControlPlane(VppTestCase):
     def setUpClass(cls):
         super(TestDHCPv6PDControlPlane, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDHCPv6PDControlPlane, cls).tearDownClass()
+
     def setUp(self):
         super(TestDHCPv6PDControlPlane, self).setUp()
 
index 9760f2f..f6ce8e8 100644 (file)
@@ -15,6 +15,14 @@ from socket import AF_INET, inet_pton
 class TestDVR(VppTestCase):
     """ Distributed Virtual Router """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestDVR, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDVR, cls).tearDownClass()
+
     def setUp(self):
         super(TestDVR, self).setUp()
 
index 2f4d726..6acde0a 100644 (file)
@@ -8,6 +8,14 @@ from framework import VppTestCase, VppTestRunner
 class TestFIB(VppTestCase):
     """ FIB Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestFIB, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestFIB, cls).tearDownClass()
+
     def test_fib(self):
         """ FIB Unit Tests """
         error = self.vapi.cli("test fib")
index df529c6..73acfdf 100644 (file)
@@ -575,6 +575,14 @@ class VppGbpAcl(VppObject):
 class TestGBP(VppTestCase):
     """ GBP Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestGBP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestGBP, cls).tearDownClass()
+
     def setUp(self):
         super(TestGBP, self).setUp()
 
@@ -1563,7 +1571,7 @@ class TestGBP(VppTestCase):
                                                self.pg2.remote_hosts[0].ip4,
                                                99))
 
-        # epg is not learnt, because the EPG is unknwon
+        # epg is not learnt, because the EPG is unknown
         self.assertEqual(len(self.vapi.gbp_endpoint_dump()), 1)
 
         #
index 85ef88f..6b3c23f 100644 (file)
@@ -30,6 +30,10 @@ class TestGRE(VppTestCase):
     def setUpClass(cls):
         super(TestGRE, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestGRE, cls).tearDownClass()
+
     def setUp(self):
         super(TestGRE, self).setUp()
 
index 26c292a..0d764f5 100644 (file)
@@ -278,6 +278,10 @@ class TestGtpu(BridgeDomain, VppTestCase):
             super(TestGtpu, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestGtpu, cls).tearDownClass()
+
     # Method to define VPP actions before tear down of the test case.
     #  Overrides tearDown method in VppTestCase class.
     #  @param self The object pointer.
index e94d29b..017382d 100644 (file)
@@ -20,6 +20,14 @@ class IgmpMode:
 class TestIgmp(VppTestCase):
     """ IGMP Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIgmp, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIgmp, cls).tearDownClass()
+
     def setUp(self):
         super(TestIgmp, self).setUp()
 
index d78cb58..e19f770 100644 (file)
@@ -36,6 +36,10 @@ class TestLoopbackInterfaceCRUD(VppTestCase):
             cls.tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestLoopbackInterfaceCRUD, cls).tearDownClass()
+
     @staticmethod
     def create_icmp_stream(src_if, dst_ifs):
         """
index 8a9841c..7ed6580 100644 (file)
@@ -22,6 +22,14 @@ from vpp_sub_interface import VppSubInterface, VppDot1QSubint, VppDot1ADSubint
 class TestIPv4(VppTestCase):
     """ IPv4 Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPv4, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv4, cls).tearDownClass()
+
     def setUp(self):
         """
         Perform test setup before test case.
@@ -229,6 +237,14 @@ class TestIPv4(VppTestCase):
 class TestICMPEcho(VppTestCase):
     """ ICMP Echo Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestICMPEcho, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestICMPEcho, cls).tearDownClass()
+
     def setUp(self):
         super(TestICMPEcho, self).setUp()
 
@@ -442,6 +458,10 @@ class TestIPv4FibCrud(VppTestCase):
             super(TestIPv4FibCrud, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv4FibCrud, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPv4FibCrud, self).setUp()
         self.reset_packet_infos()
@@ -568,6 +588,14 @@ class TestIPv4FibCrud(VppTestCase):
 class TestIPNull(VppTestCase):
     """ IPv4 routes via NULL """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPNull, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPNull, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPNull, self).setUp()
 
@@ -674,6 +702,14 @@ class TestIPNull(VppTestCase):
 class TestIPDisabled(VppTestCase):
     """ IPv4 disabled """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPDisabled, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPDisabled, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPDisabled, self).setUp()
 
@@ -762,6 +798,14 @@ class TestIPDisabled(VppTestCase):
 class TestIPSubNets(VppTestCase):
     """ IPv4 Subnets """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPSubNets, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPSubNets, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPSubNets, self).setUp()
 
@@ -875,6 +919,14 @@ class TestIPSubNets(VppTestCase):
 class TestIPLoadBalance(VppTestCase):
     """ IPv4 Load-Balancing """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPLoadBalance, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPLoadBalance, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPLoadBalance, self).setUp()
 
@@ -1150,6 +1202,14 @@ class TestIPLoadBalance(VppTestCase):
 class TestIPVlan0(VppTestCase):
     """ IPv4 VLAN-0 """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPVlan0, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPVlan0, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPVlan0, self).setUp()
 
@@ -1191,6 +1251,14 @@ class TestIPVlan0(VppTestCase):
 class TestIPPunt(VppTestCase):
     """ IPv4 Punt Police/Redirect """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPPunt, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPPunt, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPPunt, self).setUp()
 
@@ -1317,6 +1385,14 @@ class TestIPPunt(VppTestCase):
 class TestIPDeag(VppTestCase):
     """ IPv4 Deaggregate Routes """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPDeag, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPDeag, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPDeag, self).setUp()
 
@@ -1426,6 +1502,14 @@ class TestIPDeag(VppTestCase):
 class TestIPInput(VppTestCase):
     """ IPv4 Input Exceptions """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPInput, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPInput, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPInput, self).setUp()
 
@@ -1591,6 +1675,14 @@ class TestIPInput(VppTestCase):
 class TestIPDirectedBroadcast(VppTestCase):
     """ IPv4 Directed Broadcast """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPDirectedBroadcast, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPDirectedBroadcast, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPDirectedBroadcast, self).setUp()
 
@@ -1659,6 +1751,14 @@ class TestIPDirectedBroadcast(VppTestCase):
 class TestIPLPM(VppTestCase):
     """ IPv4 longest Prefix Match """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPLPM, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPLPM, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPLPM, self).setUp()
 
@@ -1722,6 +1822,10 @@ class TestIPv4Frag(VppTestCase):
             i.config_ip4()
             i.resolve_arp()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv4Frag, cls).tearDownClass()
+
     def test_frag_large_packets(self):
         """ Fragmentation of large packets """
 
index 0894515..f4f2b61 100644 (file)
@@ -89,6 +89,10 @@ class TestIpIrb(VppTestCase):
         cls.pg0.remote_hosts = cls.bvi0.remote_hosts[:half]
         cls.pg1.remote_hosts = cls.bvi0.remote_hosts[half:]
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIpIrb, cls).tearDownClass()
+
     def tearDown(self):
         """Run standard test teardown and log ``show l2patch``,
         ``show l2fib verbose``,``show bridge-domain <bd_id> detail``,
index 6d0f21d..ff6a722 100644 (file)
@@ -148,6 +148,10 @@ class TestIp4VrfMultiInst(VppTestCase):
             super(TestIp4VrfMultiInst, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIp4VrfMultiInst, cls).tearDownClass()
+
     def setUp(self):
         """
         Clear trace and packet infos before running each test.
index 77ae63b..6c959a2 100644 (file)
@@ -161,6 +161,10 @@ class TestIPv6(TestIPv6ND):
     def setUpClass(cls):
         super(TestIPv6, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv6, cls).tearDownClass()
+
     def setUp(self):
         """
         Perform test setup before test case.
@@ -946,6 +950,14 @@ class TestIPv6(TestIPv6ND):
 class TestICMPv6Echo(VppTestCase):
     """ ICMPv6 Echo Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestICMPv6Echo, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestICMPv6Echo, cls).tearDownClass()
+
     def setUp(self):
         super(TestICMPv6Echo, self).setUp()
 
@@ -1015,6 +1027,10 @@ class TestIPv6RD(TestIPv6ND):
     def setUpClass(cls):
         super(TestIPv6RD, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv6RD, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPv6RD, self).setUp()
 
@@ -1132,6 +1148,10 @@ class TestIPv6RDControlPlane(TestIPv6ND):
     def setUpClass(cls):
         super(TestIPv6RDControlPlane, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv6RDControlPlane, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPv6RDControlPlane, self).setUp()
 
@@ -1304,6 +1324,14 @@ class TestIPv6RDControlPlane(TestIPv6ND):
 class IPv6NDProxyTest(TestIPv6ND):
     """ IPv6 ND ProxyTest Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(IPv6NDProxyTest, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(IPv6NDProxyTest, cls).tearDownClass()
+
     def setUp(self):
         super(IPv6NDProxyTest, self).setUp()
 
@@ -1493,6 +1521,14 @@ class IPv6NDProxyTest(TestIPv6ND):
 class TestIPNull(VppTestCase):
     """ IPv6 routes via NULL """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPNull, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPNull, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPNull, self).setUp()
 
@@ -1561,6 +1597,14 @@ class TestIPNull(VppTestCase):
 class TestIPDisabled(VppTestCase):
     """ IPv6 disabled """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPDisabled, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPDisabled, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPDisabled, self).setUp()
 
@@ -1650,6 +1694,14 @@ class TestIPDisabled(VppTestCase):
 class TestIP6LoadBalance(VppTestCase):
     """ IPv6 Load-Balancing """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIP6LoadBalance, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIP6LoadBalance, cls).tearDownClass()
+
     def setUp(self):
         super(TestIP6LoadBalance, self).setUp()
 
@@ -1915,6 +1967,14 @@ class TestIP6LoadBalance(VppTestCase):
 class TestIP6Punt(VppTestCase):
     """ IPv6 Punt Police/Redirect """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIP6Punt, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIP6Punt, cls).tearDownClass()
+
     def setUp(self):
         super(TestIP6Punt, self).setUp()
 
@@ -2043,6 +2103,14 @@ class TestIP6Punt(VppTestCase):
 class TestIPDeag(VppTestCase):
     """ IPv6 Deaggregate Routes """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPDeag, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPDeag, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPDeag, self).setUp()
 
@@ -2162,6 +2230,14 @@ class TestIPDeag(VppTestCase):
 class TestIP6Input(VppTestCase):
     """ IPv6 Input Exception Test Cases """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIP6Input, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIP6Input, cls).tearDownClass()
+
     def setUp(self):
         super(TestIP6Input, self).setUp()
 
index 4b4a9e4..45c192d 100644 (file)
@@ -160,6 +160,10 @@ class TestIP6VrfMultiInst(VppTestCase):
             super(TestIP6VrfMultiInst, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIP6VrfMultiInst, cls).tearDownClass()
+
     def setUp(self):
         """
         Clear trace and packet infos before running each test.
index 81da693..21794d6 100644 (file)
@@ -25,6 +25,14 @@ N_PKTS_IN_STREAM = 91
 class TestMFIB(VppTestCase):
     """ MFIB Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMFIB, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMFIB, cls).tearDownClass()
+
     def setUp(self):
         super(TestMFIB, self).setUp()
 
@@ -40,6 +48,14 @@ class TestMFIB(VppTestCase):
 class TestIPMcast(VppTestCase):
     """ IP Multicast Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestIPMcast, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPMcast, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPMcast, self).setUp()
 
index c01972a..16f8369 100644 (file)
@@ -26,6 +26,10 @@ class TestIPIP(VppTestCase):
         cls.create_pg_interfaces(range(2))
         cls.interfaces = list(cls.pg_interfaces)
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPIP, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPIP, self).setUp()
         for i in self.interfaces:
@@ -248,6 +252,10 @@ class TestIPIP6(VppTestCase):
         cls.create_pg_interfaces(range(2))
         cls.interfaces = list(cls.pg_interfaces)
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPIP6, cls).tearDownClass()
+
     def setUp(self):
         super(TestIPIP6, self).setUp()
         for i in self.interfaces:
index 6788876..93e1646 100644 (file)
@@ -35,6 +35,14 @@ class TemplateIpsecAh(TemplateIpsec):
      ---             ---           ---
     """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TemplateIpsecAh, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TemplateIpsecAh, cls).tearDownClass()
+
     def setUp(self):
         super(TemplateIpsecAh, self).setUp()
 
index 8aea42a..00885ae 100644 (file)
@@ -8,6 +8,14 @@ from vpp_papi import VppEnum
 class IpsecApiTestCase(VppTestCase):
     """ IPSec API tests """
 
+    @classmethod
+    def setUpClass(cls):
+        super(IpsecApiTestCase, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(IpsecApiTestCase, cls).tearDownClass()
+
     def setUp(self):
         super(IpsecApiTestCase, self).setUp()
         self.create_pg_interfaces([0])
index d254ee7..c3a6b43 100644 (file)
@@ -178,6 +178,14 @@ class TemplateIpsecEsp(TemplateIpsec):
      ---             ---           ---
     """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TemplateIpsecEsp, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TemplateIpsecEsp, cls).tearDownClass()
+
     def setUp(self):
         super(TemplateIpsecEsp, self).setUp()
         self.encryption_type = ESP
@@ -239,6 +247,15 @@ class TemplateIpsecEspUdp(TemplateIpsec):
     """
     UDP encapped ESP
     """
+
+    @classmethod
+    def setUpClass(cls):
+        super(TemplateIpsecEspUdp, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TemplateIpsecEspUdp, cls).tearDownClass()
+
     def setUp(self):
         super(TemplateIpsecEspUdp, self).setUp()
         self.encryption_type = ESP
index e364f5f..d97fb79 100644 (file)
@@ -38,6 +38,14 @@ class IPSecNATTestCase(TemplateIpsec):
     icmp_id_in = 6305
     icmp_id_out = 6305
 
+    @classmethod
+    def setUpClass(cls):
+        super(IPSecNATTestCase, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(IPSecNATTestCase, cls).tearDownClass()
+
     def setUp(self):
         super(IPSecNATTestCase, self).setUp()
         self.tun_if = self.pg0
index 8d01185..9c5a153 100644 (file)
@@ -20,6 +20,14 @@ class TemplateIpsec4TunIfEsp(TemplateIpsec):
 
     encryption_type = ESP
 
+    @classmethod
+    def setUpClass(cls):
+        super(TemplateIpsec4TunIfEsp, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TemplateIpsec4TunIfEsp, cls).tearDownClass()
+
     def setUp(self):
         super(TemplateIpsec4TunIfEsp, self).setUp()
 
index 97915a3..a75672a 100644 (file)
@@ -131,6 +131,10 @@ class TestL2fib(VppTestCase):
             super(TestL2fib, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestL2fib, cls).tearDownClass()
+
     def setUp(self):
         super(TestL2fib, self).setUp()
         self.reset_packet_infos()
index 35d325e..a5c6e19 100644 (file)
@@ -15,6 +15,14 @@ from scapy.layers.inet import IP, UDP
 class TestL2Flood(VppTestCase):
     """ L2-flood """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestL2Flood, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestL2Flood, cls).tearDownClass()
+
     def setUp(self):
         super(TestL2Flood, self).setUp()
 
index a921bdf..718d512 100644 (file)
@@ -94,6 +94,10 @@ class TestL2bd(VppTestCase):
             super(TestL2bd, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestL2bd, cls).tearDownClass()
+
     def setUp(self):
         """
         Clear trace and packet infos before running each test.
index de84edd..9a14d1d 100644 (file)
@@ -51,6 +51,10 @@ class TestL2bdArpTerm(VppTestCase):
             super(TestL2bdArpTerm, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestL2bdArpTerm, cls).tearDownClass()
+
     def setUp(self):
         """
         Clear trace and packet infos before running each test.
index 67c2088..8ceec74 100644 (file)
@@ -128,6 +128,10 @@ class TestL2bdMultiInst(VppTestCase):
             super(TestL2bdMultiInst, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestL2bdMultiInst, cls).tearDownClass()
+
     def setUp(self):
         """
         Clear trace and packet infos before running each test.
index 8be93e4..845579b 100644 (file)
@@ -76,6 +76,10 @@ class TestL2xc(VppTestCase):
             super(TestL2xc, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestL2xc, cls).tearDownClass()
+
     def setUp(self):
         super(TestL2xc, self).setUp()
         self.reset_packet_infos()
index 6192bd1..0fb080a 100644 (file)
@@ -112,6 +112,10 @@ class TestL2xcMultiInst(VppTestCase):
             super(TestL2xcMultiInst, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestL2xcMultiInst, cls).tearDownClass()
+
     def setUp(self):
         """
         Clear trace and packet infos before running each test.
index 01af0e5..4c0bfad 100644 (file)
@@ -63,6 +63,10 @@ class TestLB(VppTestCase):
             super(TestLB, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestLB, cls).tearDownClass()
+
     def tearDown(self):
         super(TestLB, self).tearDown()
         if not self.vpp_dead:
index 561e589..0b89b1f 100644 (file)
@@ -145,6 +145,10 @@ class TestLisp(VppTestCase):
             i.config_ip4()  # configure IPv4 address on the interface
             i.resolve_arp()  # resolve ARP, so that we know VPP MAC
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestLisp, cls).tearDownClass()
+
     def setUp(self):
         super(TestLisp, self).setUp()
         self.vapi.lisp_enable_disable(is_enabled=1)
index a8e8ab3..2f04db2 100644 (file)
@@ -15,6 +15,14 @@ from scapy.layers.inet6 import IPv6, ICMPv6TimeExceeded
 class TestMAP(VppTestCase):
     """ MAP Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMAP, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMAP, cls).tearDownClass()
+
     def setUp(self):
         super(TestMAP, self).setUp()
 
index 8d5d5ab..4a1c663 100644 (file)
@@ -52,6 +52,14 @@ def verify_mpls_stack(tst, rx, mpls_labels):
 class TestMPLS(VppTestCase):
     """ MPLS Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMPLS, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMPLS, cls).tearDownClass()
+
     def setUp(self):
         super(TestMPLS, self).setUp()
 
@@ -1383,6 +1391,14 @@ class TestMPLS(VppTestCase):
 class TestMPLSDisabled(VppTestCase):
     """ MPLS disabled """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMPLSDisabled, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMPLSDisabled, cls).tearDownClass()
+
     def setUp(self):
         super(TestMPLSDisabled, self).setUp()
 
@@ -1462,6 +1478,14 @@ class TestMPLSDisabled(VppTestCase):
 class TestMPLSPIC(VppTestCase):
     """ MPLS PIC edge convergence """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMPLSPIC, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMPLSPIC, cls).tearDownClass()
+
     def setUp(self):
         super(TestMPLSPIC, self).setUp()
 
@@ -1830,6 +1854,14 @@ class TestMPLSPIC(VppTestCase):
 class TestMPLSL2(VppTestCase):
     """ MPLS-L2 """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestMPLSL2, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMPLSL2, cls).tearDownClass()
+
     def setUp(self):
         super(TestMPLSL2, self).setUp()
 
index 3203e40..14535b2 100644 (file)
@@ -33,6 +33,10 @@ class TestMTU(VppTestCase):
         cls.create_pg_interfaces(range(2))
         cls.interfaces = list(cls.pg_interfaces)
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestMTU, cls).tearDownClass()
+
     def setUp(self):
         super(TestMTU, self).setUp()
         for i in self.interfaces:
index b8d3a54..5cd0ad9 100644 (file)
@@ -1562,6 +1562,10 @@ class TestNAT44(MethodHolder):
             super(TestNAT44, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestNAT44, cls).tearDownClass()
+
     def test_dynamic(self):
         """ NAT44 dynamic translation test """
         self.nat44_add_address(self.nat_addr)
@@ -4276,6 +4280,10 @@ class TestNAT44EndpointDependent(MethodHolder):
             super(TestNAT44EndpointDependent, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestNAT44EndpointDependent, cls).tearDownClass()
+
     def test_frag_in_order(self):
         """ NAT44 translate fragments arriving in order """
         self.nat44_add_address(self.nat_addr)
@@ -6466,6 +6474,10 @@ class TestNAT44Out2InDPO(MethodHolder):
             super(TestNAT44Out2InDPO, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestNAT44Out2InDPO, cls).tearDownClass()
+
     def configure_xlat(self):
         self.dst_ip6_pfx = '1:2:3::'
         self.dst_ip6_pfx_n = socket.inet_pton(socket.AF_INET6,
@@ -6581,6 +6593,10 @@ class TestDeterministicNAT(MethodHolder):
             super(TestDeterministicNAT, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDeterministicNAT, cls).tearDownClass()
+
     def create_stream_in(self, in_if, out_if, ttl=64):
         """
         Create packet stream for inside network
@@ -7200,6 +7216,10 @@ class TestNAT64(MethodHolder):
             super(TestNAT64, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestNAT64, cls).tearDownClass()
+
     def test_nat64_inside_interface_handles_neighbor_advertisement(self):
         """ NAT64 inside interface handles Neighbor Advertisement """
 
@@ -8533,6 +8553,10 @@ class TestDSlite(MethodHolder):
             super(TestDSlite, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDSlite, cls).tearDownClass()
+
     def verify_syslog_apmadd(self, data, isaddr, isport, xsaddr, xsport,
                              sv6enc, proto):
         message = data.decode('utf-8')
@@ -8727,6 +8751,10 @@ class TestDSliteCE(MethodHolder):
             super(TestDSliteCE, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestDSliteCE, cls).tearDownClass()
+
     def test_dslite_ce(self):
         """ Test DS-Lite CE """
 
@@ -8830,6 +8858,10 @@ class TestNAT66(MethodHolder):
             super(TestNAT66, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestNAT66, cls).tearDownClass()
+
     def test_static(self):
         """ 1:1 NAT66 test """
         self.vapi.nat66_add_del_interface(self.pg0.sw_if_index)
index c3005cc..c6d9fc6 100644 (file)
@@ -24,6 +24,14 @@ arp_opts = {"who-has": 1, "is-at": 2}
 class ARPTestCase(VppTestCase):
     """ ARP Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(ARPTestCase, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(ARPTestCase, cls).tearDownClass()
+
     def setUp(self):
         super(ARPTestCase, self).setUp()
 
@@ -1411,6 +1419,14 @@ class ARPTestCase(VppTestCase):
 class NeighborStatsTestCase(VppTestCase):
     """ ARP/ND Counters """
 
+    @classmethod
+    def setUpClass(cls):
+        super(NeighborStatsTestCase, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(NeighborStatsTestCase, cls).tearDownClass()
+
     def setUp(self):
         super(NeighborStatsTestCase, self).setUp()
 
index 5200e48..6719400 100644 (file)
@@ -32,6 +32,10 @@ class P2PEthernetAPI(VppTestCase):
         for i in cls.pg_interfaces:
             i.admin_up()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(P2PEthernetAPI, cls).tearDownClass()
+
     def create_p2p_ethernet(self, parent_if, sub_id, remote_mac):
         p2p = VppP2PSubint(self, parent_if, sub_id, mac_pton(remote_mac))
         self.p2p_sub_ifs.append(p2p)
@@ -125,6 +129,10 @@ class P2PEthernetIPV6(VppTestCase):
         cls.pg1.configure_ipv6_neighbors()
         cls.pg1.disable_ipv6_ra()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(P2PEthernetIPV6, cls).tearDownClass()
+
     def setUp(self):
         super(P2PEthernetIPV6, self).setUp()
         for p in self.packets:
@@ -350,6 +358,10 @@ class P2PEthernetIPV4(VppTestCase):
         cls.pg1.generate_remote_hosts(5)
         cls.pg1.configure_ipv4_neighbors()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(P2PEthernetIPV4, cls).tearDownClass()
+
     def setUp(self):
         super(P2PEthernetIPV4, self).setUp()
         for p in self.packets:
index 4f3921e..75c18d4 100644 (file)
@@ -36,6 +36,10 @@ class TestPing(VppTestCase):
             super(TestPing, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestPing, cls).tearDownClass()
+
     def tearDown(self):
         super(TestPing, self).tearDown()
         if not self.vpp_dead:
index 2c23bd0..2d3c1ec 100644 (file)
@@ -58,6 +58,14 @@ class VppPipe(VppInterface):
 class TestPipe(VppTestCase):
     """ Pipes """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestPipe, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestPipe, cls).tearDownClass()
+
     def setUp(self):
         super(TestPipe, self).setUp()
 
index b6a1eef..5c8495f 100644 (file)
@@ -25,6 +25,10 @@ class TestPPPoE(VppTestCase):
         cls.dst_ip = "100.1.1.100"
         cls.dst_ipn = socket.inet_pton(socket.AF_INET, cls.dst_ip)
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestPPPoE, cls).tearDownClass()
+
     def setUp(self):
         super(TestPPPoE, self).setUp()
 
index c6de849..bdae498 100644 (file)
@@ -20,6 +20,14 @@ from scapy.contrib.mpls import MPLS
 class TestQOS(VppTestCase):
     """ QOS Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestQOS, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestQOS, cls).tearDownClass()
+
     def setUp(self):
         super(TestQOS, self).setUp()
 
index f3d983d..5fa912b 100644 (file)
@@ -219,6 +219,10 @@ class TestIPv4Reassembly(TestIPReassemblyMixin, VppTestCase):
         cls.create_stream(cls.packet_sizes)
         cls.create_fragments()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv4Reassembly, cls).tearDownClass()
+
     def setUp(self):
         """ Test setup - force timeout on existing reassemblies """
         super(TestIPv4Reassembly, self).setUp()
@@ -549,6 +553,10 @@ class TestIPv6Reassembly(TestIPReassemblyMixin, VppTestCase):
         cls.create_stream(cls.packet_sizes)
         cls.create_fragments()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv6Reassembly, cls).tearDownClass()
+
     def setUp(self):
         """ Test setup - force timeout on existing reassemblies """
         super(TestIPv6Reassembly, self).setUp()
@@ -845,6 +853,10 @@ class TestIPv4ReassemblyLocalNode(VppTestCase):
         cls.create_stream()
         cls.create_fragments()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestIPv4ReassemblyLocalNode, cls).tearDownClass()
+
     def setUp(self):
         """ Test setup - force timeout on existing reassemblies """
         super(TestIPv4ReassemblyLocalNode, self).setUp()
@@ -964,6 +976,10 @@ class TestFIFReassembly(VppTestCase):
         cls.packet_sizes = [64, 512, 1518, 9018]
         cls.padding = " abcdefghijklmn"
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestFIFReassembly, cls).tearDownClass()
+
     def setUp(self):
         """ Test setup - force timeout on existing reassemblies """
         super(TestFIFReassembly, self).setUp()
index 9680774..e1faa9a 100644 (file)
@@ -13,6 +13,10 @@ class TestSCTP(VppTestCase):
     def setUpClass(cls):
         super(TestSCTP, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSCTP, cls).tearDownClass()
+
     def setUp(self):
         super(TestSCTP, self).setUp()
         self.vapi.session_enable_disable(is_enabled=1)
index b8ae074..f1a3dcd 100644 (file)
@@ -13,6 +13,10 @@ class TestSession(VppTestCase):
     def setUpClass(cls):
         super(TestSession, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSession, cls).tearDownClass()
+
     def setUp(self):
         super(TestSession, self).setUp()
 
@@ -88,6 +92,14 @@ class TestSession(VppTestCase):
 class TestSessionUnitTests(VppTestCase):
     """ Session Unit Tests Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestSessionUnitTests, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSessionUnitTests, cls).tearDownClass()
+
     def setUp(self):
         super(TestSessionUnitTests, self).setUp()
         self.vapi.session_enable_disable(is_enabled=1)
index ffd5864..910313d 100644 (file)
@@ -26,6 +26,10 @@ class Test6RD(VppTestCase):
         cls.create_pg_interfaces(range(4))
         cls.interfaces = list(cls.pg_interfaces)
 
+    @classmethod
+    def tearDownClass(cls):
+        super(Test6RD, cls).tearDownClass()
+
     def setUp(self):
         super(Test6RD, self).setUp()
         t4 = VppIpTable(self, 10)
index 756405a..7e72965 100644 (file)
@@ -49,6 +49,14 @@ def verify_mpls_stack(tst, rx, mpls_labels):
 class TestSRMPLS(VppTestCase):
     """ SR-MPLS Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestSRMPLS, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSRMPLS, cls).tearDownClass()
+
     def setUp(self):
         super(TestSRMPLS, self).setUp()
 
index ed453b2..de98ff2 100644 (file)
@@ -24,8 +24,12 @@ class TestSRv6(VppTestCase):
     """ SRv6 Test Case """
 
     @classmethod
-    def setUpClass(self):
-        super(TestSRv6, self).setUpClass()
+    def setUpClass(cls):
+        super(TestSRv6, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSRv6, cls).tearDownClass()
 
     def setUp(self):
         """ Perform test setup before each test case.
index 40cc190..a788f1e 100644 (file)
@@ -28,6 +28,10 @@ class TestSRv6(VppTestCase):
     def setUpClass(self):
         super(TestSRv6, self).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSRv6, cls).tearDownClass()
+
     def setUp(self):
         """ Perform test setup before each test case.
         """
index 6b8e23c..108fcdb 100755 (executable)
@@ -27,6 +27,10 @@ class TestSRv6(VppTestCase):
     def setUpClass(self):
         super(TestSRv6, self).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSRv6, cls).tearDownClass()
+
     def setUp(self):
         """ Perform test setup before each test case.
         """
index cfdec1f..667bdf0 100644 (file)
@@ -13,6 +13,10 @@ class TestString(VppTestCase):
     def setUpClass(cls):
         super(TestString, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestString, cls).tearDownClass()
+
     def setUp(self):
         super(TestString, self).setUp()
 
index 563ed1a..b4e6722 100644 (file)
@@ -16,6 +16,14 @@ from vpp_papi import VppEnum
 class TestSVS(VppTestCase):
     """ SVS Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestSVS, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSVS, cls).tearDownClass()
+
     def setUp(self):
         super(TestSVS, self).setUp()
 
index 67a7ef1..90a0aef 100644 (file)
@@ -27,6 +27,10 @@ class TestSyslog(VppTestCase):
             super(TestSyslog, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSyslog, cls).tearDownClass()
+
     def syslog_generate(self, facility, severity, appname, msgid, sd=None,
                         msg=None):
         """
index c536628..393813c 100644 (file)
@@ -13,6 +13,10 @@ class TestTCP(VppTestCase):
     def setUpClass(cls):
         super(TestTCP, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestTCP, cls).tearDownClass()
+
     def setUp(self):
         super(TestTCP, self).setUp()
         self.vapi.session_enable_disable(is_enabled=1)
@@ -83,6 +87,14 @@ class TestTCP(VppTestCase):
 class TestTCPUnitTests(VppTestCase):
     "TCP Unit Tests"
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestTCPUnitTests, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestTCPUnitTests, cls).tearDownClass()
+
     def setUp(self):
         super(TestTCPUnitTests, self).setUp()
         self.vapi.session_enable_disable(is_enabled=1)
index 3010a1d..d69052b 100644 (file)
@@ -14,6 +14,14 @@ from scapy.contrib.mpls import MPLS
 class TestUdpEncap(VppTestCase):
     """ UDP Encap Test Case """
 
+    @classmethod
+    def setUpClass(cls):
+        super(TestUdpEncap, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestUdpEncap, cls).tearDownClass()
+
     def setUp(self):
         super(TestUdpEncap, self).setUp()
 
@@ -240,6 +248,10 @@ class TestUDP(VppTestCase):
     def setUpClass(cls):
         super(TestUDP, cls).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestUDP, cls).tearDownClass()
+
     def setUp(self):
         super(TestUDP, self).setUp()
         self.vapi.session_enable_disable(is_enabled=1)
index c657da7..4e5a62d 100644 (file)
@@ -11,6 +11,13 @@ class TesVhostInterface(VppTestCase):
     """Vhost User Test Case
 
     """
+    @classmethod
+    def setUpClass(cls):
+        super(TesVhostInterface, cls).setUpClass()
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TesVhostInterface, cls).tearDownClass()
 
     def tearDown(self):
         super(TesVhostInterface, self).tearDown()
index 63e1cc7..b7e131f 100644 (file)
@@ -67,6 +67,10 @@ class TestVtr(VppTestCase):
             super(TestVtr, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestVtr, cls).tearDownClass()
+
     def setUp(self):
         """
         Clear trace and packet infos before running each test.
index 5ded725..5ffb2fe 100644 (file)
@@ -217,6 +217,10 @@ class TestVxlan(BridgeDomain, VppTestCase):
             super(TestVxlan, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestVxlan, cls).tearDownClass()
+
     def test_encap_big_packet(self):
         """ Encapsulation test send big frame from pg1
         Verify receipt of encapsulated frames on pg0
index 1e6edcf..b4f8699 100644 (file)
@@ -156,6 +156,10 @@ class TestVxlanGbp(VppTestCase):
             super(TestVxlanGbp, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestVxlanGbp, cls).tearDownClass()
+
     def assert_eq_pkts(self, pkt1, pkt2):
         """ Verify the Ether, IP, UDP, payload are equal in both
         packets