Skip to content

Move some BGP external API types from omicron-common to nexus-types - #9915

Merged
jgallagher merged 8 commits into
mainfrom
john/nexus-external-common-to-types
Feb 26, 2026
Merged

jgallagher merged 8 commits into
mainfrom
john/nexus-external-common-to-types

Conversation

@jgallagher

Copy link
Copy Markdown
Contributor

This PR moves four types. BgpAnnouncement and BgpAnnounceSet have only ever had one version; these are just straight up moves from common to nexus/types/versions/src/initial/networking.rs.

BgpPeerState and BgpPeerStatus are more complicated. I believe the state of them on main, prior to this PR, is:

  • Their initial versions live in nexus/types/versions/src/initial/networking.rs
  • Their second versions live in nexus/types/versions/src/bgp_peer_collision_state/networking.rs (aka v2025_12_12_00).
  • Their latest versions live in common/src/api/external/mod.rs. BgpPeerStatus has a new field (peer_id), but BgpPeerState is duplicated completely unchanged. Conversions are split between From impls inside the second version in nexus-types and inline in nexus/external-api.

After this PR, we should have:

  • The latest version of BgpPeerState is the second version (first defined in v2025_12_12_00).
  • The latest version of BgpPeerStatus is now in nexus/types/versions/src/bgp_unnumbered_peers/networking.rs (aka v2026_02_13_01).
  • Both are exported under latest::networking, and From impls are colocated as per RFD 619.

There should be no OpenAPI changes; we're only moving things around internally.

Part of #9801.

@jgallagher

jgallagher commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor Author

84ddfe9 is worth a quick look. It moves a few more types that have not had multiple versions: BgpMessageHistory, SwitchBgpHistory, and AggregateBgpMessageHistory. These are the remaining types from common that depended on mg-admin-types, allowing us to remove that dependency from common altogether. I thought that meant I could also drop it from ls-apis's manifest, but we can't do that until all the other repos that point back to omicron also see the dependency removed.

It also fixes the broken ls-apis check by adding a bogus filter from nexus-types to mg-admin-client.

Moves the latest versions of `BgpConfig`, `BgpImported`, and
`BgpExported` to the nexus-types version where they were introduced.
Allows us to address some lingering todos about `From` impls in the
wrong places on older versions.

Part of #9801.
@jgallagher
jgallagher enabled auto-merge (squash) February 26, 2026 19:46
@jgallagher
jgallagher merged commit 6176a28 into main Feb 26, 2026
17 checks passed
@jgallagher
jgallagher deleted the john/nexus-external-common-to-types branch February 26, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants