Associate password with each shelf for multi-shelf firmware updates
Each ES24N shelf has a unique Admin password (its BMC serial number), so a single shared password is incorrect for multi-shelf runs. The password prompt now appears once per shelf inside _collect_shelves(), stored as the first element of each (password, [(iom, ip), ...]) shelf tuple. _make_targets() threads the password into each (label, iom, ip, password) target entry, and _show_fw_versions() uses the per-target password instead of a global one. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -214,17 +214,18 @@ def _get_fabric_fw_version(password: str, host: str, iom: str) -> str:
|
||||
return _c(C.RED, "Unreachable")
|
||||
|
||||
|
||||
def _show_fw_versions(password: str, targets: list):
|
||||
def _show_fw_versions(targets: list):
|
||||
"""
|
||||
Query and display firmware versions.
|
||||
targets: list of (label, iom, ip) tuples where
|
||||
label: display string (e.g. "IOM1", "S1 / IOM1")
|
||||
iom: actual IOM name used in Redfish paths ("IOM1" or "IOM2")
|
||||
ip: management IP address
|
||||
targets: list of (label, iom, ip, password) tuples where
|
||||
label: display string (e.g. "IOM1", "S1 / IOM1")
|
||||
iom: actual IOM name used in Redfish paths ("IOM1" or "IOM2")
|
||||
ip: management IP address
|
||||
password: Admin password for this shelf
|
||||
"""
|
||||
info("Querying firmware versions...")
|
||||
rows = []
|
||||
for label, iom, ip in targets:
|
||||
for label, iom, ip, password in targets:
|
||||
iom_ver = _get_iom_fw_version(password, ip, iom)
|
||||
fabric_ver = _get_fabric_fw_version(password, ip, iom)
|
||||
rows.append([label, ip, iom_ver, fabric_ver])
|
||||
|
||||
Reference in New Issue
Block a user