summaryrefslogtreecommitdiff
path: root/cxmanage_api/cli/commands/fabric.py
diff options
context:
space:
mode:
Diffstat (limited to 'cxmanage_api/cli/commands/fabric.py')
-rw-r--r--cxmanage_api/cli/commands/fabric.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/cxmanage_api/cli/commands/fabric.py b/cxmanage_api/cli/commands/fabric.py
index df63128..a47c5f3 100644
--- a/cxmanage_api/cli/commands/fabric.py
+++ b/cxmanage_api/cli/commands/fabric.py
@@ -131,3 +131,28 @@ def uplink_info_command(args):
print "Some errors occured during the command.\n"
return len(errors) == 0
+
+
+def uplinks_command(args):
+ """get uplinks from nodes"""
+ args.all_nodes = False
+
+ tftp = get_tftp(args)
+ nodes = get_nodes(args, tftp)
+
+ if not args.quiet:
+ print "Getting uplinks..."
+ results, errors = run_command(
+ args, nodes, "run_fabric_tftp_command", "fabric_config_get_uplinks"
+ )
+
+ for node in nodes:
+ if node in results:
+ print "[ Uplinks from %s ]" % node.ip_address
+ print results[node].strip()
+ print
+
+ if not args.quiet and errors:
+ print "Some errors occured during the command.\n"
+
+ return len(errors) == 0