Limit serial workflows to IOM1 only — IOM2 unreachable over serial

The serial cable connects to IOM1's console port. IOM2 cannot be queried
or configured via the serial connection. Updated all serial-path code to
reflect this:

workflow_serial.py:
- fetch_current_config: query IOM1 only, single-row table
- collect_network_config: prompt for IOM1 settings only, drop IOM2 section
- apply_configuration: apply to IOM1 only, single-row result table
- print_summary: IOM1-only table, updated warning text

workflow_check.py (_check_via_serial):
- Query IOM1 only for network settings, IOM firmware, and Fabric Card firmware

CLAUDE.md updated to document the IOM1-only serial limitation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 10:47:12 -04:00
parent c587e64f9e
commit 76ee347d91
3 changed files with 117 additions and 156 deletions

View File

@@ -97,54 +97,49 @@ def _check_via_serial():
time.sleep(2)
return
rule("Querying IOM Status")
info("Querying network settings and firmware versions via serial console...")
rule("Querying IOM1 Status")
info("Querying IOM1 network settings and firmware versions via serial console...")
info("Note: only IOM1 is reachable over the serial connection.")
print()
net_rows = []
fw_rows = []
# ── Network settings ───────────────────────────────────────────────────────
net_ok, net_data = _serial_redfish_request(
ser, password, "GET",
"/redfish/v1/Managers/IOM1/EthernetInterfaces/1",
)
if net_ok and isinstance(net_data, dict):
dhcp, ip, gw, nm, origin = _parse_network_data(net_data)
mode = _c(C.CYN, "DHCP") if dhcp else _c(C.GRN, "Static")
net_rows = [["IOM1", mode, origin, ip, gw, nm]]
else:
net_rows = [["IOM1", _c(C.RED, "No response"), "--", "--", "--", "--"]]
error(f"IOM1 network query failed: {net_data}")
for iom in ("IOM1", "IOM2"):
# ── Network settings ───────────────────────────────────────────────────
net_ok, net_data = _serial_redfish_request(
ser, password, "GET",
f"/redfish/v1/Managers/{iom}/EthernetInterfaces/1",
)
if net_ok and isinstance(net_data, dict):
dhcp, ip, gw, nm, origin = _parse_network_data(net_data)
mode = _c(C.CYN, "DHCP") if dhcp else _c(C.GRN, "Static")
net_rows.append([iom, mode, origin, ip, gw, nm])
else:
net_rows.append([iom, _c(C.RED, "No response"), "--", "--", "--", "--"])
error(f"{iom} network query failed: {net_data}")
# ── IOM firmware version ───────────────────────────────────────────────────
iom_ok, iom_data = _serial_redfish_request(
ser, password, "GET",
"/redfish/v1/Managers/IOM1",
)
iom_ver = (
iom_data.get("FirmwareVersion", "Unknown")
if (iom_ok and isinstance(iom_data, dict))
else _c(C.RED, "Unreachable")
)
# ── IOM firmware version ───────────────────────────────────────────────
iom_ok, iom_data = _serial_redfish_request(
ser, password, "GET",
f"/redfish/v1/Managers/{iom}",
)
iom_ver = (
iom_data.get("FirmwareVersion", "Unknown")
if (iom_ok and isinstance(iom_data, dict))
else _c(C.RED, "Unreachable")
)
# ── Fabric card firmware version ───────────────────────────────────────────
fab_ok, fab_data = _serial_redfish_request(
ser, password, "GET",
"/redfish/v1/Chassis/IOM1/NetworkAdapters/1",
)
fab_ver = (
(fab_data.get("Oem", {})
.get("Version", {})
.get("ActiveFirmwareVersion", "Unknown"))
if (fab_ok and isinstance(fab_data, dict))
else _c(C.RED, "Unreachable")
)
# ── Fabric card firmware version ───────────────────────────────────────
fab_ok, fab_data = _serial_redfish_request(
ser, password, "GET",
f"/redfish/v1/Chassis/{iom}/NetworkAdapters/1",
)
fab_ver = (
(fab_data.get("Oem", {})
.get("Version", {})
.get("ActiveFirmwareVersion", "Unknown"))
if (fab_ok and isinstance(fab_data, dict))
else _c(C.RED, "Unreachable")
)
fw_rows.append([iom, iom_ver, fab_ver])
_print_results(net_rows, fw_rows)
_print_results(net_rows, [["IOM1", iom_ver, fab_ver]])
close_serial_connection(ser, device)