aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VppCounters.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-04-05 13:07:02 +0200
committerPeter Mikus <pmikus@cisco.com>2018-04-06 10:25:34 +0000
commit84e2999a1b8847e4ae43cc2b0faf901ac8575bc1 (patch)
tree0b0c7e1f0523b3a90295a465afa8c06e6e1a5922 /resources/libraries/python/VppCounters.py
parent995ac8540182cecb151298a61633c202150020ce (diff)
FIX: VAT SSH timeout
Currently when VAT cannot connect to VPP via direct API call, there is inner timeout of ~100s until it quits and returns RC. In our code we are setting outer timeout to 10/15s to detect if VAT is not responding. If VAT does not respond quickly enough due to e.g VPP crash, we are incorrectly reporting SSHTimout exception. This fix is suppose to set correct timeout values and also to set some of the calls like show run|hard|err / clear to detect whether they were successfull or not. + Various small library cleanup. Change-Id: I787c4baecd7e086705a4076643e255a875ea8438 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/VppCounters.py')
-rw-r--r--resources/libraries/python/VppCounters.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/resources/libraries/python/VppCounters.py b/resources/libraries/python/VppCounters.py
index 8247a1e8ab..5dc14a9a4e 100644
--- a/resources/libraries/python/VppCounters.py
+++ b/resources/libraries/python/VppCounters.py
@@ -26,16 +26,6 @@ class VppCounters(object):
def __init__(self):
self._stats_table = None
- def vpp_nodes_clear_interface_counters(self, nodes):
- """Clear interface counters on all VPP nodes in topology.
-
- :param nodes: Nodes in topology.
- :type nodes: dict
- """
- for node in nodes.values():
- if node['type'] == NodeType.DUT:
- self.vpp_clear_interface_counters(node)
-
@staticmethod
def vpp_show_errors(node):
"""Run "show errors" debug CLI command.
@@ -45,6 +35,7 @@ class VppCounters(object):
"""
vat = VatExecutor()
vat.execute_script("show_errors.vat", node, json_out=False)
+ vat.script_should_have_passed()
@staticmethod
def vpp_show_errors_verbose(node):
@@ -55,6 +46,7 @@ class VppCounters(object):
"""
vat = VatExecutor()
vat.execute_script("show_errors_verbose.vat", node, json_out=False)
+ vat.script_should_have_passed()
@staticmethod
def vpp_show_errors_on_all_duts(nodes, verbose=False):
@@ -82,6 +74,7 @@ class VppCounters(object):
"""
vat = VatExecutor()
vat.execute_script("show_runtime.vat", node, json_out=False)
+ vat.script_should_have_passed()
@staticmethod
def show_runtime_counters_on_all_duts(nodes):
@@ -103,6 +96,7 @@ class VppCounters(object):
"""
vat = VatExecutor()
vat.execute_script("show_runtime_verbose.vat", node, json_out=False)
+ vat.script_should_have_passed()
@staticmethod
def vpp_show_hardware_detail(node):
@@ -113,6 +107,7 @@ class VppCounters(object):
"""
vat = VatExecutor()
vat.execute_script("show_hardware_detail.vat", node, json_out=False)
+ vat.script_should_have_passed()
@staticmethod
def vpp_clear_runtime(node):
@@ -123,6 +118,7 @@ class VppCounters(object):
"""
vat = VatExecutor()
vat.execute_script("clear_runtime.vat", node, json_out=False)
+ vat.script_should_have_passed()
@staticmethod
def clear_runtime_counters_on_all_duts(nodes):