oxidecomputer / oxidecomputer/omicron

BGP API: 'show-status' and 'status' show the same info in different formats

Open
#10,011 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There are 2 options under the 'system network bgp' command that show the same info, just in different formats: show-status and status.
There could probably be just one status with a '--format' option to let the user select how they would like for this info to get displayed OR rename the options to be more descriptive. Perhaps 'status-json' and 'status-table' would provide clarity on expectations.

paulina@radium:~/oxide/product-assurance/oxide-cli-tests$ oxide system networking bgp show-status --profile preview
switch0
=======
Peer Address  Peer Id       Local ASN  Remote ASN  Session State  State Duration
45.154.216.4  45.154.216.4  65003      64601       established    21days 3h 13m 56s 849ms
45.154.216.3  45.154.216.3  65003      64601       established    21days 3h 13m 57s 758ms

switch1
=======
Peer Address  Peer Id       Local ASN  Remote ASN  Session State  State Duration
45.154.216.3  45.154.216.3  65003      64601       established    21days 3h 20m 5s 851ms
45.154.216.4  45.154.216.4  65003      64601       established    21days 3h 13m 30s 491ms
paulina@radium:~/oxide/product-assurance/oxide-cli-tests$ oxide system networking bgp status --profile preview
[
  {
    "addr": "45.154.216.4",
    "local_asn": 65003,
    "peer_id": "45.154.216.4",
    "remote_asn": 64601,
    "state": "established",
    "state_duration_millis": 1826015068,
    "switch": "switch1"
  },
  {
    "addr": "45.154.216.3",
    "local_asn": 65003,
    "peer_id": "45.154.216.3",
    "remote_asn": 64601,
    "state": "established",
    "state_duration_millis": 1826410428,
    "switch": "switch1"
  },
  {
    "addr": "45.154.216.4",
    "local_asn": 65003,
    "peer_id": "45.154.216.4",
    "remote_asn": 64601,
    "state": "established",
    "state_duration_millis": 1826041426,
    "switch": "switch0"
  },
  {
    "addr": "45.154.216.3",
    "local_asn": 65003,
    "peer_id": "45.154.216.3",
    "remote_asn": 64601,
    "state": "established",
    "state_duration_millis": 1826042335,
    "switch": "switch0"
  }
]

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 by comparing the system networking bgp show-status and status command entry points and their output behavior. Done means the duplicate presentation is resolved through one format-selectable command or clearly renamed commands, with the human-readable and JSON outputs still available and distinguishable.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.