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>
The serial terminal echoes the curl command back before executing it.
The -w format string contains '%{http_code}' which includes a literal '{'.
When the terminal wraps long command lines (IOM2's path is ~70 chars),
that '{' can land at a line boundary, causing find("{") to pick up the
wrong position and produce garbled JSON/error output.
Fix: narrow the JSON search to the text before the HTTP_CODE: marker,
then use rfind("\n{") to find the last newline-prefixed '{'. The actual
curl response always starts on its own line, while the echoed '{http_code}'
is embedded mid-line in the command echo — so rfind("\n{") reliably skips it.
Also tighten the error snippet to use the same search_area bounds so the
displayed error shows actual response content rather than command echo text.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The BMC serial number (e.g. MXE3000048LHA03C) is embedded in the IOM
hostname shown in the serial login prompt. It also doubles as the root
password, so no manual entry is needed.
- If at login prompt: extract serial from 'hostname login:' line
- If already logged in: run 'hostname' on the shell and extract serial
- Falls back to prompt_password() if extraction fails either way
_login_serial_console() now returns (success, password) instead of bool.
Callers in workflow_serial.py and workflow_check.py updated accordingly.
CLAUDE.md updated to document the behaviour and remove it from planned features.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds _at_shell_prompt() helper that detects a shell prompt by checking
whether any line ends with '#' or '# ', rather than using a bare '#' in
response check guarded by 'login' not in output. The old guard caused a
false negative when the IOM echoed 'Last login: ...' text alongside the
prompt, sending an unnecessary login attempt to an active session.
Also broadens _ANSI_RE to catch all CSI escape sequences and two-character
ESC sequences, not just the original five terminal codes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Redfish API at 127.0.0.1 is only accessible from within the IOM's
own shell, not directly from the host over the serial cable. The previous
approach of making urllib HTTPS requests from the host to 127.0.0.1 was
fundamentally incorrect.
Changes:
- serial_port.py: add optional per-call timeout override to
read_until_quiet() so curl responses have enough time to arrive
- workflow_serial.py:
- add _login_serial_console() — sends username/password over serial
and waits for a shell prompt before proceeding
- add _serial_redfish_request() — builds and sends a curl command
over the serial session, parses HTTP status and JSON from the output
- fetch_current_config(), apply_configuration(), _apply_iom() now
accept and use a SerialPort instance via _serial_redfish_request()
- configure_shelf() calls _login_serial_console() after collecting
the password, before making any Redfish calls
- remove unused _redfish_request import (HTTP transport no longer
used in the serial workflow)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update sys.path reference in es24n_conf.py and all documentation
to reflect the new folder name.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>