summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-01-30 11:15:56 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-02-02 13:42:37 +0200
commitae142588405743298d322310434ba28b9b8b8f74 (patch)
tree2376fdb52710f78d4aa3694dd7ab9494fbf6dbd0 /scripts/automation/trex_control_plane/stl
parent39000f461de6b85877db85488b1cc7f1fad9d359 (diff)
console scan6: ipv6 column width adaptive to length of addresses
Change-Id: I08c7dd08487102bb09b337c20101a62469a38e7d Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index a6aa47aa..46ab668e 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -3080,10 +3080,13 @@ class STLClient(object):
if not rc:
self.logger.log(format_text(rc, 'bold'))
elif rc.data():
+ max_ip_len = 0
+ for resp in rc.data():
+ max_ip_len = max(max_ip_len, len(resp['ipv6']))
scan_table = TRexTextTable()
scan_table.set_cols_align(['c', 'c', 'l'])
scan_table.header(['Device', 'MAC', 'IPv6 address'])
- scan_table.set_cols_width([9, 19, 42])
+ scan_table.set_cols_width([9, 19, max_ip_len + 2])
resp = 'Port %s - IPv6 search result:' % port
self.logger.log(format_text(resp, 'bold'))
@@ -4001,6 +4004,8 @@ class STLClient(object):
opts = parser.parse_args(line.split(), default_ports = self.get_acquired_ports())
if not opts:
return opts
+ print(opts)
+ print(parsing_opts.ON_OFF_DICT)
opts.prom = parsing_opts.ON_OFF_DICT.get(opts.prom)
opts.mult = parsing_opts.ON_OFF_DICT.get(opts.mult)