diff options
author | imarom <imarom@cisco.com> | 2016-03-02 16:01:08 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-03-02 16:01:08 +0200 |
commit | 26873712908fcfb26ee5310c961846b79f0a8249 (patch) | |
tree | a94aa192f9bdf998257b5c6764defa5dce74fcbe /scripts/automation/trex_control_plane/stl/console/trex_console.py | |
parent | 9c62e2a6f114d99a7271e259bad2601a28cd9c4a (diff) |
port mapping - hardening
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console/trex_console.py')
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/console/trex_console.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py index ffad03f3..d96a7623 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -349,17 +349,25 @@ class TRexConsole(TRexGeneralCmd): with self.stateless_client.logger.supress(): table = stl_map_ports(self.stateless_client, ports = ports) - tmp = list(ports) + print format_text('\nAcquired ports topology:\n', 'bold', 'underline') - while tmp: - a = tmp.pop(0) - b = table[a] - tmp.remove(b) - print "port {0} <--> port {1}".format(a, b) + # bi-dir ports + print format_text('Bi-directional ports:\n','underline') + for port_a, port_b in table['bi']: + print "port {0} <--> port {1}".format(port_a, port_b) + + print "" + # unknown ports + print format_text('Mapping unknown:\n','underline') + for port in table['unknown']: + print "port {0}".format(port) print "" + + + def do_history (self, line): '''Manage the command history\n''' |