aboutsummaryrefslogtreecommitdiff
path: root/admin.py
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2014-12-05 16:07:20 +0000
committerSteve McIntyre <steve.mcintyre@linaro.org>2014-12-05 16:07:20 +0000
commit08dd839c57b592469707968908a56b36d449cc02 (patch)
tree6c784506a496a313a671439d06f4d71a316cb20b /admin.py
parent11e4cbd6f0443e53f03e899020f06ba72ce1a898 (diff)
Implement show_port
Change-Id: I2dc70e2115c405e195a3bc04bbe29d6d19906a65
Diffstat (limited to 'admin.py')
-rw-r--r--admin.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/admin.py b/admin.py
index a9a2444..91c2697 100644
--- a/admin.py
+++ b/admin.py
@@ -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'