wicket: add inventory transceivers CLI subcommand#10429
Draft
arturhoo wants to merge 1 commit intooxidecomputer:mainfrom
Draft
wicket: add inventory transceivers CLI subcommand#10429arturhoo wants to merge 1 commit intooxidecomputer:mainfrom
inventory transceivers CLI subcommand#10429arturhoo wants to merge 1 commit intooxidecomputer:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a rack's Nexus is unreachable (mid-mupdate, uplinks down, internal underlay broken),
/v1/system/hardware/switch-port/{port}/statusis 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
inventorysubcommand currently only exposesconfigured-bootstrap-sleds. This addsinventory transceivers, which dumps the sameTransceiverInventorySnapshotthe TUI reads fromGET /inventory.--format jsonserializes 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. Thewicket@sshd disallows TCP forwarding so wicketd'slocalhost:12226can't be reached any other way from outside the switch zone.