diff options
author | Steve McIntyre <steve.mcintyre@linaro.org> | 2014-12-05 16:07:20 +0000 |
---|---|---|
committer | Steve McIntyre <steve.mcintyre@linaro.org> | 2014-12-05 16:07:20 +0000 |
commit | 08dd839c57b592469707968908a56b36d449cc02 (patch) | |
tree | 6c784506a496a313a671439d06f4d71a316cb20b /admin.py | |
parent | 11e4cbd6f0443e53f03e899020f06ba72ce1a898 (diff) |
Implement show_port
Change-Id: I2dc70e2115c405e195a3bc04bbe29d6d19906a65
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -336,6 +336,15 @@ elif opts.list_switch_ports is not None: print 'No ports found for switch_id %d' % opts.list_switch_ports except InputError as inst: print 'Failed: %s' % inst +elif opts.show_port is not None: + try: + port = db.get_port_by_id(opts.show_port) + if port is not None: + dump_port(port) + else: + print 'No port found for port_id %d' % opts.show_port + except InputError as inst: + print 'Failed: %s' % inst else: print 'No recognised command given. Try -h for help' |