diff options
author | George Kraft <george.kraft@calxeda.com> | 2013-12-17 16:30:16 -0600 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2013-12-17 16:31:01 -0600 |
commit | 6c7d87675345624c37648180f194f3a84ad45b13 (patch) | |
tree | dda75cde76b284a86a5b692824dfbd0c84874318 /cxmanage_api/cli/commands/tspackage.py | |
parent | 5cb7f8af710627b90bb38f9b5ece5c0ebc3bdfde (diff) | |
download | cxmanage-6c7d87675345624c37648180f194f3a84ad45b13.tar.gz |
CXMAN-278: Add LAN info to tspackage command
Basically just a dump of "ipmitool lan print"
Diffstat (limited to 'cxmanage_api/cli/commands/tspackage.py')
-rw-r--r-- | cxmanage_api/cli/commands/tspackage.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cxmanage_api/cli/commands/tspackage.py b/cxmanage_api/cli/commands/tspackage.py index 0a4beb3..75158a8 100644 --- a/cxmanage_api/cli/commands/tspackage.py +++ b/cxmanage_api/cli/commands/tspackage.py @@ -93,6 +93,10 @@ def tspackage_command(args): print("Getting version information...") write_version_info(args, nodes) + if not quit: + print("Getting LAN information...") + write_lan_info(args, nodes) + if not quiet: print("Getting boot order...") write_boot_order(args, nodes) @@ -200,6 +204,19 @@ def write_version_info(args, nodes): write_to_file(node, lines) + +def write_lan_info(args, nodes): + """Write LAN info for each node""" + results, _ = run_command(args, nodes, "bmc.lan_print") + + for node in nodes: + lines = ["\n[ LAN info for Node %s ]" % node.node_id] + for (key, value) in sorted(vars(results[node]).items()): + lines.append("%s: %s" % (key, value)) + + write_to_file(node, lines) + + def write_mac_addrs(args, nodes): """Write the MAC addresses for each node to their respective files.""" mac_addr_results, _ = run_command( |