summaryrefslogtreecommitdiff
path: root/cxmanage_api/cli/commands/tspackage.py
diff options
context:
space:
mode:
Diffstat (limited to 'cxmanage_api/cli/commands/tspackage.py')
-rw-r--r--cxmanage_api/cli/commands/tspackage.py17
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(