diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-07-17 12:40:49 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2019-07-17 12:40:49 +0200 |
commit | f88a3d9178dfbd73d0479f9aa2f5224e0c89ca1f (patch) | |
tree | 9963cb06a7f089d815f9ebf5e5ba8d8f1f26a209 /resources/libraries/python/VppCounters.py | |
parent | 248d1a52e06622dc9eb1dfdd6ca9f6670b4c0bc3 (diff) |
Use PapiSocketProvider for most PAPI calls
Ticket: CSIT-1541
Ticket: VPP-1722
Ticket: CSIT-1546
+ Increase timeout to hide x520 slownes of show hardware detail.
- Install sshpass and update ssh client in virl bootstrap.
+ Added TODOs to remove when CSIT-1546 is fixed.
+ Enable default socksvr on any startup conf.
+ Improve OptionString init and repr.
- The non-socket executor still kept for stats.
+ Remove everything unrelated to stats from non-socket executor.
- Remove some debug-loooking calls to avoid failures.
TODO: Introduce proper parsing to the affected keywords.
+ Reduce logging from PAPI code to level INFO.
- Needs https://gerrit.fd.io/r/20660 to fully work.
+ Change default values for LocalExecution.run()
+ Return code check enabled by default.
Code is more readable when rc!=0 is allowed explicitly,
and the test code will now detect unexpected failures.
+ Logging disabled by default.
Output XML is large already. Important logging can be enabled explicitly.
+ Restore alphabetical order in common.sh functions.
Change-Id: I05882cb6b620ad14638f7404b5ad38c7a5de9e6c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/VppCounters.py')
-rw-r--r-- | resources/libraries/python/VppCounters.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/resources/libraries/python/VppCounters.py b/resources/libraries/python/VppCounters.py index dd1553538d..03b40b7a6b 100644 --- a/resources/libraries/python/VppCounters.py +++ b/resources/libraries/python/VppCounters.py @@ -19,6 +19,7 @@ from pprint import pformat from robot.api import logger from resources.libraries.python.PapiExecutor import PapiExecutor +from resources.libraries.python.PapiExecutor import PapiSocketExecutor from resources.libraries.python.topology import NodeType, Topology @@ -46,7 +47,7 @@ class VppCounters(object): :param node: Node to run command on. :type node: dict """ - PapiExecutor.run_cli_cmd(node, 'show errors') + PapiSocketExecutor.run_cli_cmd(node, 'show errors') @staticmethod def vpp_show_errors_verbose(node): @@ -55,7 +56,7 @@ class VppCounters(object): :param node: Node to run command on. :type node: dict """ - PapiExecutor.run_cli_cmd(node, 'show errors verbose') + PapiSocketExecutor.run_cli_cmd(node, 'show errors verbose') @staticmethod def vpp_show_errors_on_all_duts(nodes, verbose=False): @@ -161,7 +162,7 @@ class VppCounters(object): :param node: Node to run command on. :type node: dict """ - PapiExecutor.run_cli_cmd(node, 'show hardware detail') + PapiSocketExecutor.run_cli_cmd(node, 'show hardware detail') @staticmethod def vpp_clear_runtime(node): @@ -172,7 +173,7 @@ class VppCounters(object): :returns: Verified data from PAPI response. :rtype: dict """ - return PapiExecutor.run_cli_cmd(node, 'clear runtime', log=False) + return PapiSocketExecutor.run_cli_cmd(node, 'clear runtime', log=False) @staticmethod def clear_runtime_counters_on_all_duts(nodes): @@ -194,7 +195,8 @@ class VppCounters(object): :returns: Verified data from PAPI response. :rtype: dict """ - return PapiExecutor.run_cli_cmd(node, 'clear interfaces', log=False) + return PapiSocketExecutor.run_cli_cmd( + node, 'clear interfaces', log=False) @staticmethod def clear_interface_counters_on_all_duts(nodes): @@ -216,7 +218,7 @@ class VppCounters(object): :returns: Verified data from PAPI response. :rtype: dict """ - return PapiExecutor.run_cli_cmd(node, 'clear hardware', log=False) + return PapiSocketExecutor.run_cli_cmd(node, 'clear hardware', log=False) @staticmethod def clear_hardware_counters_on_all_duts(nodes): @@ -238,7 +240,7 @@ class VppCounters(object): :returns: Verified data from PAPI response. :rtype: dict """ - return PapiExecutor.run_cli_cmd(node, 'clear errors', log=False) + return PapiSocketExecutor.run_cli_cmd(node, 'clear errors', log=False) @staticmethod def clear_error_counters_on_all_duts(nodes): |