oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
252 stars 40 forks source link

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

Open taspelund opened 7 hours ago

taspelund commented 7 hours ago

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]