Skip to content

wicket: add inventory transceivers CLI subcommand#10429

Draft
arturhoo wants to merge 1 commit intooxidecomputer:mainfrom
arturhoo:wicket-cli-inventory-transceivers
Draft

wicket: add inventory transceivers CLI subcommand#10429
arturhoo wants to merge 1 commit intooxidecomputer:mainfrom
arturhoo:wicket-cli-inventory-transceivers

Conversation

@arturhoo
Copy link
Copy Markdown

@arturhoo arturhoo commented May 9, 2026

When a rack's Nexus is unreachable (mid-mupdate, uplinks down, internal underlay broken), /v1/system/hardware/switch-port/{port}/status is unavailable, so there's no API path to the front-port transceiver monitors — even though wicketd already has them (it polls the SP every 5 s independently of Nexus) and the TUI displays them when a switch is selected.

The wicket CLI's inventory subcommand currently only exposes configured-bootstrap-sleds. This adds inventory transceivers, which dumps the same TransceiverInventorySnapshot the TUI reads from GET /inventory.

--format json serializes the full snapshot (per-lane Rx/Tx optical power, temperature, vendor, datapath, status). --format table (default) is a per-port summary; the detailed monitor data is left to the JSON output rather than reproducing the TUI's per-lane formatting.

The motivating case: diagnosing why a rack's uplinks are down by checking optical levels, over an ssh wicket@<techport> session, when Nexus on that rack isn't serving. The wicket@ sshd disallows TCP forwarding so wicketd's localhost:12226 can't be reached any other way from outside the switch zone.

The TUI shows front-port transceiver state (vendor, power, optical
Rx/Tx, temperature) when a switch is selected, but the CLI's
`inventory` subcommand only exposes `configured-bootstrap-sleds`.

This adds `inventory transceivers [--format {table,json}]`, reading
the same `TransceiverInventorySnapshot` from wicketd's `/inventory`
endpoint. JSON serializes the full snapshot; table is a per-port
summary.

wicketd polls the SP for this data independently of Nexus, so this
remains available over `ssh wicket@<techport>` when Nexus is down —
which is when you most want to check optical levels to diagnose dead
uplinks. wicketd binds :12226 to localhost only and the wicket sshd
disallows TCP forwarding, so a CLI subcommand is the only way to get
this non-interactively from outside the switch zone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant