cli: tag DATA column in 'show interface' summary#1495
Open
troglobit wants to merge 2 commits into
Open
Conversation
The summary view's DATA column previously held a single bare value
(MAC for ethernet/veth/gretap/vxlan, empty for gre, etc.). Add a
key:value-per-token format on the row types where DATA was thin or
actively misleading:
- ethernet: mac:<MAC> [speed:<rate>-<DUP>]
- veth: mac:<MAC>
- vlan: vid:<N> (was: parent's MAC, duplicate of the
└ parent row drawn underneath)
- gre: remote:<addr>
- gretap: mac:<MAC> [remote:<addr>]
- vxlan: mac:<MAC> [vni:<N>]
Speed/duplex use a compact summary token: 100M-FDX, 1G-FDX, 25G-FDX,
HDX for half-duplex. Unit hop M->G at 1 Gbps. Token omitted when
ethtool can't report (no link, no SFP). Detail view (show interface
<name>) is unchanged and still spells out auto-negotiation, duplex,
and speed in full.
Bridge ports, wireguard, wifi, lag, container, and loopback rows
already carried the right info; left untouched. Updates affected
unit-test snapshots under test/case/statd/* and doc/*.md screenshots.
Closes #530
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The CLI command was renamed long ago when the plural form was removed from klish (now only `show interface [name]` exists), but docs and the landing page still showed the old plural form. Update all user-facing examples to match. Internal subcommand names (cli_pretty's `-t show-interfaces`, test fixture filenames) and historical ChangeLog entries are intentionally left as-is. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
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.
Description
The DATA column in
show interfacesummary previously held a single bare value (MAC for ethernet/veth/gretap/vxlan, empty for gre, etc.). This made it impossible to see operational facts like negotiated speed/duplex without opening the detail view per port.DATA now carries one or more
key:valuetokens per row, populating the fields each row type actually has:mac:<MAC>andspeed:<rate>-<DUP>when linkedmac:<MAC>vid:<N>(replaces the parent's MAC, which duplicated the└ parentrow already drawn underneath)remote:<addr>mac:<MAC>andremote:<addr>mac:<MAC>andvni:<N>Speed uses a compact
<rate>-<DUP>token:100M-FDX,1G-FDX,25G-FDX,HDXfor half-duplex. Unit hop M→G at 1 Gbps. Token is omitted whenethtoolcan't report — no link, no SFP, admin-disabled.The detail view (
show interface <name>) is unchanged and still spells outauto-negotiation,duplex, andspeed(Mbps) in full.Bridge ports, wireguard, wifi, lag, container, and loopback rows already carried the right info — left untouched.
Second commit catches up on a long-overdue
show interfaces→show interfacerename in docs and the landing page (the plural form was removed from klish years ago; user-facing examples were missed).Example
Checklist
Tick relevant boxes, this PR is-a or has-a: