Add System Check workflow with serial and network connection options

Adds workflow_check.py: a read-only diagnostic that queries current network
settings and firmware versions (IOM + Fabric Card) from both IOMs. Accessible
via a new main menu option (3 — System Check); Exit moves to option 4.
Supports both serial console (curl over the serial session) and direct network
(HTTPS to management IP) connection methods.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 22:25:16 -04:00
parent d80dac2222
commit 3361fdd1a6
3 changed files with 251 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ modules/
redfish.py ← Redfish API client (shared by all workflows)
workflow_serial.py ← Serial-based IOM network configuration workflow
workflow_firmware.py ← IOM and Fabric Card firmware update workflow
workflow_check.py ← Read-only system check (network settings + firmware versions)
```
`es24n_conf.py` adds `modules/` to `sys.path` at startup so all inter-module imports work without a package structure.
@@ -54,6 +55,13 @@ Updates IOM firmware and/or Fabric Card firmware over the network:
- The firmware file must be re-uploaded between the IOM and Fabric Card steps — it does not persist after the first update (firmware quirk, documented in `_update_fabric_fw()`)
- Scans the current working directory for firmware files (`.bin`, `.img`, `.fw`, `.hex`, `.zip`, `.tar`, `.tgz`, `.gz`) and presents them as a numbered list before falling back to manual path entry
### 3 — System Check (`workflow_check.py`)
Read-only diagnostic workflow — queries current network settings and firmware versions, makes no changes:
- **Serial:** logs in via serial console, queries both IOMs using `_serial_redfish_request()` (curl over the serial session); covers network settings, IOM firmware, and Fabric Card firmware
- **Network:** prompts for management IP(s), queries via direct HTTPS using `Admin` credentials; reuses `_redfish_request()`, `_get_iom_fw_version()`, `_get_fabric_fw_version()` from `redfish.py`
- Displays results in two tables: network configuration and firmware versions
- User selects Serial, Network, or Cancel at the sub-menu prompt
## Key Design Notes
**Static IP firmware bug workaround:** Setting a static IP requires two sequential PATCH requests:
@@ -74,3 +82,4 @@ A single PATCH combining both fields fails due to a known ES24N firmware bug. Do
## Planned Features
- Network-based IOM network configuration (`workflow_network.py`) — same config workflow as serial but connecting via the IOM's existing IP address using `Admin` credentials, for cases where the IOM is already reachable on the network
- Auto-detect password from serial login prompt — the IOM BMC serial number (e.g. `MXE3000043CHA007`) appears to be embedded in the login prompt hostname; if confirmed on a live system, this could allow `_login_serial_console()` to skip the manual password prompt