Make sw_interface_dump more compatible with 2.2.0
[vpp.git] / test / test_vxlan_gbp.py
index 11e1198..b4eb069 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
@@ -199,7 +203,7 @@ class TestVxlanGbp(VppTestCase):
 
         self.pg_start()
 
-        # Pick first received frame and check if it's corectly encapsulated.
+        # Pick first received frame and check if it's correctly encapsulated.
         out = self.pg0.get_capture(1)
         pkt = out[0]
         self.check_encapsulation(pkt, self.single_tunnel_bd)
@@ -218,7 +222,7 @@ class TestVxlanGbp(VppTestCase):
 
         self.pg_start()
 
-        # Get packet from each tunnel and assert it's corectly encapsulated.
+        # Get packet from each tunnel and assert it's correctly encapsulated.
         out = self.pg0.get_capture(self.n_ucast_tunnels)
         for pkt in out:
             self.check_encapsulation(pkt, self.ucast_flood_bd, True)
@@ -256,11 +260,12 @@ class TestVxlanGbp(VppTestCase):
 #  @param self The object pointer.
     def tearDown(self):
         super(TestVxlanGbp, self).tearDown()
-        if not self.vpp_dead:
-            self.logger.info(self.vapi.cli("show bridge-domain 1 detail"))
-            self.logger.info(self.vapi.cli("show bridge-domain 3 detail"))
-            self.logger.info(self.vapi.cli("show vxlan-gbp tunnel"))
-            self.logger.info(self.vapi.cli("show error"))
+
+    def show_commands_at_teardown(self):
+        self.logger.info(self.vapi.cli("show bridge-domain 1 detail"))
+        self.logger.info(self.vapi.cli("show bridge-domain 3 detail"))
+        self.logger.info(self.vapi.cli("show vxlan-gbp tunnel"))
+        self.logger.info(self.vapi.cli("show error"))
 
 
 if __name__ == '__main__':