summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client/trex_stateless_client.py
diff options
context:
space:
mode:
authorDan Klein <danklein10@gmail.com>2015-12-07 08:35:46 +0200
committerDan Klein <danklein10@gmail.com>2015-12-07 08:35:46 +0200
commit1895d21485621c3428d045fa0f5b9daf165c8260 (patch)
tree813caafec15abda81deccaf742d16ecb6d960b4e /scripts/automation/trex_control_plane/client/trex_stateless_client.py
parent503c10b024aa2ed6d4d8dc7fb5debf4a64bd9b1e (diff)
clear command now works as well..
Diffstat (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_stateless_client.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_stateless_client.py b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
index e02620a6..748817da 100755
--- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
@@ -421,6 +421,9 @@ class Port(object):
"port-status": self.get_port_state_name()
}
+ def clear_stats(self):
+ return self.port_stats.clear_stats()
+
################# events handler ######################
def async_event_port_stopped (self):
self.state = self.STATE_STREAMS
@@ -951,10 +954,11 @@ class CTRexStatelessClient(object):
return RC_OK()
def cmd_clear(self, port_id_list):
- # self.info_and_stats.clear(port_id_list)
+ for port_id in port_id_list:
+ self.ports[port_id].clear_stats()
+ self.global_stats.clear_stats()
return RC_OK()
-
# pause cmd
def cmd_pause (self, port_id_list):
@@ -962,7 +966,7 @@ class CTRexStatelessClient(object):
active_ports = list(set(self.get_active_ports()).intersection(port_id_list))
if not active_ports:
- msg = "No active traffic on porvided ports"
+ msg = "No active traffic on provided ports"
print format_text(msg, 'bold')
return RC_ERR(msg)