CSIT-465: Common test setup and teardown
[csit.git] / resources / libraries / python / VppCounters.py
index af3ea47..e755c75 100644 (file)
@@ -57,6 +57,23 @@ class VppCounters(object):
         vat = VatExecutor()
         vat.execute_script("show_errors_verbose.vat", node, json_out=False)
 
+    @staticmethod
+    def vpp_show_errors_on_all_duts(nodes, verbose=False):
+        """Show errors on all DUTs.
+
+        :param nodes: VPP nodes
+        :param verbose: If True show verbose output.
+        :type nodes: dict
+        :type verbose: bool
+        """
+
+        for node in nodes.values():
+            if node['type'] == NodeType.DUT:
+                if verbose:
+                    VppCounters.vpp_show_errors_verbose(node)
+                else:
+                    VppCounters.vpp_show_errors(node)
+
     @staticmethod
     def vpp_show_runtime(node):
         """Run "show runtime" CLI command.