summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-10-25 07:44:24 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-10-28 14:38:34 +0200
commit528f62bb50ca111f387b56b280f3a4b271f8ace3 (patch)
treeddc5534dc74c87defed1f18422555cafa11329c1
parent6cd8432f6fa549c35cc96a5446d0e17eb2c5dd40 (diff)
console "stats --ps" move link status to another line
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py7
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py5
2 files changed, 7 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
index 7a8965df..d0f34f48 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
@@ -43,9 +43,9 @@ class Port(object):
STATES_MAP = {STATE_DOWN: "DOWN",
STATE_IDLE: "IDLE",
STATE_STREAMS: "IDLE",
- STATE_TX: "ACTIVE",
+ STATE_TX: "TRANSMITTING",
STATE_PAUSE: "PAUSE",
- STATE_PCAP_TX : "ACTIVE"}
+ STATE_PCAP_TX : "TRANSMITTING"}
def __init__ (self, port_id, user, comm_link, session_id, info):
@@ -719,7 +719,8 @@ class Port(object):
"--": "",
"---": "",
"link speed": "{speed} Gb/s".format(speed=info['speed']),
- "status": '%s (link %s)' % (info['status'], info['link']),
+ "status": info['status'],
+ "link": info['link'],
"promiscuous" : info['prom'],
"flow ctrl" : info['fc'],
}
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
index 783387ca..fd4ad953 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
@@ -667,6 +667,7 @@ class CTRexInfoGenerator(object):
per_field_status = OrderedDict([("driver", []),
("description", []),
("link speed", []),
+ ("link", []),
("status", []),
("promiscuous", []),
("flow ctrl", []),
@@ -1096,8 +1097,8 @@ class CPortStats(CTRexStats):
def generate_stats(self):
port_state = self._port_obj.get_port_state_name() if self._port_obj else ""
- if port_state == "ACTIVE":
- port_state = format_text('TRANSMITTING', 'green', 'bold')
+ if port_state == "TRANSMITTING":
+ port_state = format_text(port_state, 'green', 'bold')
elif port_state == "PAUSE":
port_state = format_text(port_state, 'magenta', 'bold')
else: