oxidecomputer / oxidecomputer/omicron

oxide hardware switch-port show-status should filter fewer columns on unconfigured ports

Open
#7,144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement networking
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

oxide hardware switch-port show-status displays rows for each physical port on the system, even when Configured=false.
However, most of these columns are empty even when they aren't all dependent on configuration.
e.g.
MAC, Enabled and Link/FSM State are not shouldn't be dependent on Configured, and Autoneg + FEC could display default values if they exist.

Current output (trimmed):

✕ treyaspelund@Tallon-IV 12:30:42 PM | ~/Downloads
‣ ./oxide --profile colo-admin system hardware switch-port show-status
switch0
=======
Port    Configured  Enabled  MAC                Autoneg  FEC   Link/FSM State  Media    Speed
qsfp0   true        true     a8:40:25:05:15:23  false    RS    up/LinkUp       Optical  Speed100G
qsfp1   true        true     a8:40:25:05:15:27  false    None  up/LinkUp       Optical  Speed100G
qsfp10  false       -        -                  -        -     -               -        -
qsfp11  false       -        -                  -        -     -               -        -
qsfp12  false       -        -                  -        -     -               -        -
qsfp13  false       -        -                  -        -     -               -        -
qsfp14  false       -        -                  -        -     -               -        -
qsfp15  false       -        -                  -        -     -               -        -
qsfp16  false       -        -                  -        -     -               -        -
qsfp17  false       -        -                  -        -     -               -        -
qsfp18  false       -        -                  -        -     -               -        -
qsfp19  false       -        -                  -        -     -               -        -
qsfp2   false       -        -                  -        -     -               -        -
qsfp20  false       -        -                  -        -     -               -        -
qsfp21  false       -        -                  -        -     -               -        -
qsfp22  false       -        -                  -        -     -               -        -
qsfp23  false       -        -                  -        -     -               -        -
qsfp24  false       -        -                  -        -     -               -        -
qsfp25  false       -        -                  -        -     -               -        -
qsfp26  false       -        -                  -        -     -               -        -
qsfp27  false       -        -                  -        -     -               -        -
qsfp28  false       -        -                  -        -     -               -        -
qsfp29  false       -        -                  -        -     -               -        -
qsfp3   false       -        -                  -        -     -               -        -
qsfp30  false       -        -                  -        -     -               -        -
qsfp31  false       -        -                  -        -     -               -        -
qsfp4   false       -        -                  -        -     -               -        -
qsfp5   false       -        -                  -        -     -               -        -
qsfp6   false       -        -                  -        -     -               -        -
qsfp7   false       -        -                  -        -     -               -        -
qsfp8   true        true     a8:40:25:05:15:43  false    RS    up/LinkUp       Optical  Speed100G
qsfp9   false       -        -                  -        -     -               -        -
[snip]

Proposed output (trimmed):

switch0
=======
Port    Configured  Enabled  MAC                Autoneg  FEC   Link/FSM State  Media    Speed
qsfp0   true        true     a8:40:25:05:15:23  false    RS    up/LinkUp       Optical  Speed100G
qsfp1   true        true     a8:40:25:05:15:27  false    None  up/LinkUp       Optical  Speed100G
qsfp10  false       false    a8:40:25:05:15:28   false       None     down/LinkDown     -        Speed100G
qsfp11  false       false    a8:40:25:05:15:29   false       None     down/LinkDown     -        Speed100G
[snip]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the implementation of oxide hardware switch-port show-status and trace how rows for unconfigured ports are assembled. Verify that unconfigured rows expose the requested non-configuration fields and retain appropriate defaults, while configured rows remain unchanged; use the issue's proposed output as the acceptance reference.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.