diff options
author | George Kraft <george.kraft@calxeda.com> | 2013-12-17 15:15:35 -0600 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2013-12-17 15:15:35 -0600 |
commit | dc5b1b22b9db064ae7fb7e413404ab5a39f29ff6 (patch) | |
tree | 20459d21ccc2ffe877d36e6335c29e83035a3a63 /cxmanage_api/cli/commands/fabric.py | |
parent | 7109c081d2b058ac29f2dab93552b68350f22401 (diff) | |
download | cxmanage-dc5b1b22b9db064ae7fb7e413404ab5a39f29ff6.tar.gz |
CXMAN-276: Add "cxmanage uplink_info" command
Diffstat (limited to 'cxmanage_api/cli/commands/fabric.py')
-rw-r--r-- | cxmanage_api/cli/commands/fabric.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cxmanage_api/cli/commands/fabric.py b/cxmanage_api/cli/commands/fabric.py index 49f73fd..df63128 100644 --- a/cxmanage_api/cli/commands/fabric.py +++ b/cxmanage_api/cli/commands/fabric.py @@ -106,3 +106,28 @@ def partition_config_command(args): print "Some errors occured during the command.\n" return len(errors) == 0 + + +def uplink_info_command(args): + """get uplink info from nodes""" + args.all_nodes = False + + tftp = get_tftp(args) + nodes = get_nodes(args, tftp) + + if not args.quiet: + print "Getting uplink info..." + results, errors = run_command( + args, nodes, "run_fabric_tftp_command", "fabric_config_get_uplink_info" + ) + + for node in nodes: + if node in results: + print "[ Uplink info 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 |