diff options
Diffstat (limited to 'cxmanage_api')
-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 b42f797..49f73fd 100644 --- a/cxmanage_api/cli/commands/fabric.py +++ b/cxmanage_api/cli/commands/fabric.py @@ -81,3 +81,28 @@ def macaddrs_command(args): print "Some errors occured during the command.\n" return len(errors) == 0 + + +def partition_config_command(args): + """get partition config from nodes""" + args.all_nodes = False + + tftp = get_tftp(args) + nodes = get_nodes(args, tftp) + + if not args.quiet: + print "Getting partition config..." + results, errors = run_command( + args, nodes, "run_fabric_tftp_command", "fabric_info_partition_config" + ) + + for node in nodes: + if node in results: + print "[ Partition config 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 |