diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-11-19 12:00:57 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-12-17 14:58:10 +0000 |
commit | 3ff919f8eb9fa7eb98887f029be7f817de7a1303 (patch) | |
tree | d8352bf3d6b51d636d3f7d5adccbe7166134f98c /resources/libraries/python/VppCounters.py | |
parent | 20083f2e3d4fcd603ecba522e08e445b932cca5f (diff) |
Telemetry: Add more operational data
+ Add both NDR and PDR telemetry capture
+ Speedup sockets
+ Adjust privileges
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: Ia6fd5d405e6fb410651d8b705c921653753aea10
Diffstat (limited to 'resources/libraries/python/VppCounters.py')
-rw-r--r-- | resources/libraries/python/VppCounters.py | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/resources/libraries/python/VppCounters.py b/resources/libraries/python/VppCounters.py index e6bb51ef4e..411302ae58 100644 --- a/resources/libraries/python/VppCounters.py +++ b/resources/libraries/python/VppCounters.py @@ -114,7 +114,7 @@ class VppCounters: ) @staticmethod - def vpp_show_runtime_counters_on_all_duts(nodes): + def vpp_show_runtime_on_all_duts(nodes): """Clear VPP runtime counters on all DUTs. :param nodes: VPP nodes. @@ -125,8 +125,8 @@ class VppCounters: VppCounters.vpp_show_runtime(node) @staticmethod - def vpp_show_hardware_verbose(node): - """Run "show hardware-interfaces verbose" debug CLI command. + def vpp_show_interface(node): + """Run "show interface" debug CLI command. :param node: Node to run command on. :type node: dict @@ -149,6 +149,17 @@ class VppCounters: ) @staticmethod + def vpp_show_memory_on_all_duts(nodes): + """Run "show memory" on all DUTs. + + :param nodes: VPP nodes. + :type nodes: dict + """ + for node in nodes.values(): + if node[u"type"] == NodeType.DUT: + VppCounters.vpp_show_memory(node) + + @staticmethod def vpp_clear_runtime(node): """Run "clear runtime" CLI command. @@ -160,7 +171,7 @@ class VppCounters: ) @staticmethod - def vpp_clear_runtime_counters_on_all_duts(nodes): + def vpp_clear_runtime_on_all_duts(nodes): """Run "clear runtime" CLI command on all DUTs. :param nodes: VPP nodes. @@ -171,8 +182,8 @@ class VppCounters: VppCounters.vpp_clear_runtime(node) @staticmethod - def vpp_clear_hardware_counters(node): - """Run "clear hardware" CLI command. + def vpp_clear_interfaces(node): + """Run "clear interfaces" CLI command. :param node: Node to run command on. :type node: dict @@ -180,22 +191,22 @@ class VppCounters: :rtype: dict """ PapiSocketExecutor.run_cli_cmd_on_all_sockets( - node, u"clear hardware", log=False + node, u"clear interfaces", log=False ) @staticmethod - def vpp_clear_hardware_counters_on_all_duts(nodes): - """Clear hardware counters on all DUTs. + def vpp_clear_interfaces_on_all_duts(nodes): + """Clear interfaces on all DUTs. :param nodes: VPP nodes. :type nodes: dict """ for node in nodes.values(): if node[u"type"] == NodeType.DUT: - VppCounters.vpp_clear_hardware_counters(node) + VppCounters.vpp_clear_interfaces(node) @staticmethod - def vpp_clear_errors_counters(node): + def vpp_clear_errors(node): """Run "clear errors" CLI command. :param node: Node to run command on. @@ -206,7 +217,7 @@ class VppCounters: ) @staticmethod - def vpp_clear_error_counters_on_all_duts(nodes): + def vpp_clear_errors_on_all_duts(nodes): """Clear VPP errors counters on all DUTs. :param nodes: VPP nodes. @@ -214,7 +225,7 @@ class VppCounters: """ for node in nodes.values(): if node[u"type"] == NodeType.DUT: - VppCounters.vpp_clear_errors_counters(node) + VppCounters.vpp_clear_errors(node) @staticmethod def show_vpp_statistics(node): @@ -224,9 +235,7 @@ class VppCounters: :type node: dict """ VppCounters.vpp_show_errors(node) - VppCounters.vpp_show_hardware_verbose(node) - VppCounters.vpp_show_runtime(node) - VppCounters.vpp_show_memory(node) + VppCounters.vpp_show_interface(node) @staticmethod def show_statistics_on_all_duts(nodes): @@ -246,9 +255,8 @@ class VppCounters: :param node: VPP node. :type node: dict """ - VppCounters.vpp_clear_errors_counters(node) - VppCounters.vpp_clear_hardware_counters(node) - VppCounters.vpp_clear_runtime(node) + VppCounters.vpp_clear_errors(node) + VppCounters.vpp_clear_interfaces(node) @staticmethod def clear_statistics_on_all_duts(nodes): |