aboutsummaryrefslogtreecommitdiff
path: root/vland-admin
diff options
context:
space:
mode:
Diffstat (limited to 'vland-admin')
-rwxr-xr-xvland-admin17
1 files changed, 17 insertions, 0 deletions
diff --git a/vland-admin b/vland-admin
index 96a7cfc..f635699 100755
--- a/vland-admin
+++ b/vland-admin
@@ -698,6 +698,23 @@ elif args.which == 'lookup_ports_by_trunk':
except InputError as inst:
print 'Failed: %s' % inst
exitcode = Error.FAILED
+elif args.which == 'get_port_mode':
+ try:
+ mode = call_vland('db_query',
+ {'command':'db.get_port_mode',
+ 'data':
+ {'port_id': args.port_id}})
+ if mode is not None:
+ print 'port_id %s is in mode %s' % (args.port_id, mode)
+ else:
+ print 'No port found for port_id %s' % args.port_id
+ exitcode = Error.NOTFOUND
+ except InputError as inst:
+ print 'Failed: %s' % inst
+ exitcode = Error.FAILED
+ except NotFoundError as inst:
+ print 'Failed: %s' % inst
+ exitcode = Error.NOTFOUND
elif args.which == 'set_port_mode':
try:
port_id = call_vland('vlan_update',