Prompt for firmware file once — IOM and Fabric Card use the same file

Previously prompted separately for each component. Since both updates
use the same firmware file, select it once and pass it to both steps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 13:06:57 -04:00
parent d7c553fa31
commit a05ba977d3

View File

@@ -262,14 +262,8 @@ def firmware_update_workflow():
update_iom = choice in ("1", "3") update_iom = choice in ("1", "3")
update_fabric = choice in ("2", "3") update_fabric = choice in ("2", "3")
iom_fw_path = ""
fabric_fw_path = ""
if update_iom: fw_path = _prompt_fw_file("firmware file")
iom_fw_path = _prompt_fw_file("IOM firmware file")
if update_fabric:
fabric_fw_path = _prompt_fw_file("Fabric Card firmware file")
print() print()
warn("For HA systems: update the passive IOM first.") warn("For HA systems: update the passive IOM first.")
@@ -287,9 +281,9 @@ def firmware_update_workflow():
for label, iom, ip, password in targets: for label, iom, ip, password in targets:
rule(f"{label} ({ip})") rule(f"{label} ({ip})")
if update_iom: if update_iom:
_update_iom_fw(password, ip, iom, iom_fw_path) _update_iom_fw(password, ip, iom, fw_path)
if update_fabric: if update_fabric:
_update_fabric_fw(password, ip, iom, fabric_fw_path) _update_fabric_fw(password, ip, iom, fw_path)
rule("Post-Update Firmware Validation") rule("Post-Update Firmware Validation")
_show_fw_versions(targets) _show_fw_versions(targets)