From feb152b7d5eb531d439a4950d27cbc44031daf92 Mon Sep 17 00:00:00 2001 From: imarom Date: Tue, 8 Dec 2015 07:43:24 -0500 Subject: text based TUI (does not use ncurses) --- .../automation/trex_control_plane/client/trex_stateless_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py') 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 0c6d9855..0a583f46 100755 --- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py +++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py @@ -321,6 +321,8 @@ class Port(object): self.streams[stream_id] = None + self.state = self.STATE_STREAMS if len(self.streams > 0) else self.STATE_IDLE + return self.ok() # remove all the streams @@ -335,6 +337,8 @@ class Port(object): self.streams = {} + self.state = self.STATE_IDLE + return self.ok() # get a specific stream @@ -1364,12 +1368,13 @@ class CTRexStatelessClient(object): # set to show all stats if no filter was given mask = trex_stats.ALL_STATS_OPTS - # get stats objects, as dictionary stats = self.cmd_stats(opts.ports, mask) + # print stats to screen for stat_type, stat_data in stats.iteritems(): text_tables.print_table_with_header(stat_data.text_table, stat_type) + return RC_OK() @@ -1481,6 +1486,7 @@ class CTRexStatelessClient(object): def _filter_namespace_args(namespace, ok_values): return {k: v for k, v in namespace.__dict__.items() if k in ok_values} + ################################# # ------ private classes ------ # class CCommLink(object): -- cgit 1.2.3-korg