summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client/trex_stateless_client.py
diff options
context:
space:
mode:
authorDan Klein <danklein10@gmail.com>2016-01-08 13:55:24 +0200
committerDan Klein <danklein10@gmail.com>2016-01-08 13:55:24 +0200
commit859a72101c94a26296efcc713882b472caf6ff8e (patch)
treef0b9e4032828ecf9931c0a6adf909e5a8a20b9d8 /scripts/automation/trex_control_plane/client/trex_stateless_client.py
parent8e037c2bd51844dc7c42ce7b2339806d9dcb964b (diff)
minor updates
Diffstat (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_stateless_client.py22
1 files changed, 13 insertions, 9 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 6139884d..42d5031e 100755
--- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
@@ -1065,8 +1065,8 @@ class CTRexStatelessClient(object):
"streams",
self.cmd_streams_line.__doc__,
parsing_opts.PORT_LIST_WITH_ALL,
- parsing_opts.STREAMS_MASK,
- parsing_opts.FULL_OUTPUT)
+ parsing_opts.STREAMS_MASK)#,
+ #parsing_opts.FULL_OUTPUT)
opts = parser.parse_args(line.split())
@@ -1074,14 +1074,18 @@ class CTRexStatelessClient(object):
return RC_ERR("bad command line parameters")
streams = self.cmd_streams(opts.ports, set(opts.streams))
+ if not streams:
+ # we got no streams running
- # print stats to screen
- for stream_hdr, port_streams_data in streams.iteritems():
- text_tables.print_table_with_header(port_streams_data.text_table,
- header= stream_hdr.split(":")[0] + ":",
- untouched_header= stream_hdr.split(":")[1])
-
- return RC_OK()
+ print format_text("No streams found with desired filter.\n", "bold", "magenta")
+ return RC_ERR("No streams found with desired filter.")
+ else:
+ # print stats to screen
+ for stream_hdr, port_streams_data in streams.iteritems():
+ text_tables.print_table_with_header(port_streams_data.text_table,
+ header= stream_hdr.split(":")[0] + ":",
+ untouched_header= stream_hdr.split(":")[1])
+ return RC_OK()