oxidecomputer / oxidecomputer/omicron
Return a stronger type from `mgs_client::sp_local_switch_id()`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
Currently this function only returns a numeric type of 0 or 1, based on the switch slot. A stronger type would make it more straightforward to confidently match on all variants as we expand our switch enumeration capabilities.
Reference:
https://github.com/oxidecomputer/omicron/pull/3262#discussion_r1256485298
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the mgs_client::sp_local_switch_id() entry point and read the discussion linked from PR #3262 for the intended stronger type. Trace its callers and update the return type so switch-slot variants can be matched explicitly as the enumeration expands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100