diff options
author | Steve McIntyre <steve.mcintyre@linaro.org> | 2014-12-23 22:51:00 +0000 |
---|---|---|
committer | Steve McIntyre <steve.mcintyre@linaro.org> | 2014-12-23 22:51:00 +0000 |
commit | 27d4b580d53b3cf5a10c73f5d6398018a4dcd410 (patch) | |
tree | 97c5453e2f2c50d238f38e0e3d8c3f671ce2ae70 /util.py | |
parent | 798af8420d85c093d77178b9f8f6091fe72363d1 (diff) |
Add port names to probe_switches() output
Change-Id: Ib1ff816ad5cbc6876e5dc500817444150d335bcd
Diffstat (limited to 'util.py')
-rw-r--r-- | util.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -24,7 +24,9 @@ class VlanUtil: s.switch_connect(config.switches[switch_name].username, config.switches[switch_name].password, config.switches[switch_name].enable_password) - ret[switch_name] = 'Found %d ports' % len(s.switch_get_port_names()) + ret[switch_name] = 'Found %d ports: ' % len(s.switch_get_port_names()) + for name in s.switch_get_port_names(): + ret[switch_name] += '%s ' % name s.switch_disconnect() del(s) return ret |