summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/console/trex_status.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-09-21 18:27:02 +0300
committerimarom <imarom@cisco.com>2015-09-21 18:27:02 +0300
commitd9e1cc14540431aa8baf8480625aa54c2a7c7175 (patch)
tree5372329a16edcae2851d203337a046b29d35143c /scripts/automation/trex_control_plane/console/trex_status.py
parent3f4249b20c0edfb6902d1e4b5ebd13244f5a17b7 (diff)
more refinments on the console
Diffstat (limited to 'scripts/automation/trex_control_plane/console/trex_status.py')
-rw-r--r--scripts/automation/trex_control_plane/console/trex_status.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/console/trex_status.py b/scripts/automation/trex_control_plane/console/trex_status.py
index 301b71f5..b881f9f5 100644
--- a/scripts/automation/trex_control_plane/console/trex_status.py
+++ b/scripts/automation/trex_control_plane/console/trex_status.py
@@ -235,6 +235,26 @@ class SinglePortPanel(TrexStatusPanel):
self.getwin().addstr(y, 2, "Streams:", curses.A_UNDERLINE)
y += 2
+ # stream table header
+ self.getwin().addstr(y, 2, "{:^15} {:^15} {:^15} {:^15} {:^15} {:^15} {:^15}".format(
+ "Stream ID", "Enabled", "Type", "Self Start", "ISG", "Next Stream", "VM"))
+ y += 2
+
+ # streams
+ if 'streams' in self.status_obj.snapshot[self.port_id]:
+ for stream_id, stream in self.status_obj.snapshot[self.port_id]['streams'].iteritems():
+ self.getwin().addstr(y, 2, "{:^15} {:^15} {:^15} {:^15} {:^15} {:^15} {:^15}".format(
+ stream_id,
+ ("True" if stream['stream']['enabled'] else "False"),
+ stream['stream']['mode']['type'],
+ ("True" if stream['stream']['self_start'] else "False"),
+ stream['stream']['isg'],
+ (stream['stream']['next_stream_id'] if stream['stream']['next_stream_id'] != -1 else "None"),
+ ("{0} instr.".format(len(stream['stream']['vm'])) if stream['stream']['vm'] else "None")))
+
+ y += 1
+
+ # new section - traffic
y += 2
self.getwin().addstr(y, 2, "Traffic:", curses.A_UNDERLINE)
@@ -279,6 +299,8 @@ class TrexStatus():
self.log = []
self.rpc_client = rpc_client
+ self.snapshot = self.rpc_client.snapshot()
+
# fetch server info
self.get_server_info()