X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppCounters.py;fp=resources%2Flibraries%2Fpython%2FVppCounters.py;h=411302ae580a1c1c9a3afac1a62276b5be338f7a;hp=e6bb51ef4e5c752959cb2b7d094e8dce22c931ac;hb=3ff919f8eb9fa7eb98887f029be7f817de7a1303;hpb=20083f2e3d4fcd603ecba522e08e445b932cca5f 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 @@ -148,6 +148,17 @@ class VppCounters: node, u"show memory verbose api-segment stats-segment main-heap" ) + @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):