Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oxide system hardware switch-port status should return a formatted mac address instead of a byte array #7148

Open
taspelund opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something that isn't working. good first issue Issues that are good for learning the codebase networking Related to the networking.

Comments

@taspelund
Copy link
Contributor

In the current output, the mac address shows up as a byte array in decimal:

✕ treyaspelund@Tallon-IV 01:05:08 PM | ~/Downloads
‣ ./oxide --profile colo-admin system hardware switch-port status --port qsfp8 --switch-location switch1 --rack-id 48759651-d754-43e2-ad49-64dde3adc1c2
{
  "link": {
    "address": {   <<<<<
      "a": [       <<<<<
        168,       <<<<<
        64,        <<<<<
        37,        <<<<<
        5,         <<<<<
        15,        <<<<<
        67,        <<<<<
      ]            <<<<<
    },
    "asic_id": 136,
    "autoneg": false,
    "enabled": true,
    "fec": "RS",
    "fsm_state": "LinkUp",
    "ipv6_enabled": false,
    "kr": false,
    "link_id": 0,
    "link_state": "up",
    "media": "Optical",
    "port_id": "qsfp8",
    "prbs": "Mission",
    "presence": true,
    "speed": "Speed100G",
    "tofino_connector": 41
  },
  "monitors": {
    "receiver_power": [
      {
        "average": 1.2298001050949097
      },
      {
        "average": 0.8708999752998352
      },
      {
        "average": 0.9979000091552734
      },
      {
        "average": 1.1165000200271606
      }
    ],
    "transmitter_bias_current": [
      47.880001068115234,
      47.880001068115234,
      47.880001068115234,
      47.880001068115234
    ],
    "transmitter_power": [
      0.959600031375885,
      0.7152000069618225,
      0.8762000203132629,
      1.259200096130371
    ]
  }
}

This should be displayed as a formatted string, like it is in oxide system hardware switch-port show-status:

✕ treyaspelund@Tallon-IV 01:05:31 PM | ~/Downloads
‣ ./oxide --profile colo-admin system hardware switch-port show-status | grep 'qsfp[89]'
qsfp8   true        true     a8:40:25:05:15:43  false    RS    up/LinkUp       Optical  Speed100G
qsfp9   false       -        -                  -        -     -               -        -
qsfp8   true        true     a8:40:25:05:0f:43  false    RS    up/LinkUp       Optical  Speed100G        <<<<<<
qsfp9   false       -        -                  -        -     -               -        -
@taspelund taspelund added bug Something that isn't working. good first issue Issues that are good for learning the codebase networking Related to the networking. labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working. good first issue Issues that are good for learning the codebase networking Related to the networking.
Projects
None yet
Development

No branches or pull requests

1 participant