Skip to content

Commit 0e22f72

Browse files
[deps] bump maghemite to aa03ae9, migrate to mg-api-types
Picks up recent oxidecomputer/maghemite#729 (ddmd --api-only flag) and the preceding main changes that moved canonical types out of the auto-generated client into the `mg-api-types` crate. Includes: - replaces `rdb-types` (removed upstream) with `mg-api-types` as a direct workspace dep - bumps `num_enum` 0.7.5 -> 0.7.6 to satisfy maghemite's workspace pin - migrates types - renames `bgp_apply_v2` callers to `bgp_apply` - `DdmInstance` fixture is renamed from `--no-state-machine` to `--api-only` to match the new clap flag.
1 parent e212660 commit 0e22f72

14 files changed

Lines changed: 124 additions & 74 deletions

File tree

Cargo.lock

Lines changed: 62 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,9 @@ ntp-admin-api = { path = "ntp-admin/api" }
604604
ntp-admin-client = { path = "clients/ntp-admin-client" }
605605
ntp-admin-types = { path = "ntp-admin/types" }
606606
ntp-admin-types-versions = { path = "ntp-admin/types/versions" }
607-
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "974423895c17cc23711732f518e447b284425ccd" }
608-
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "974423895c17cc23711732f518e447b284425ccd" }
607+
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "aa03ae96aa97d22a6bdb75831a8a1218c79d3908" }
608+
mg-api-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "aa03ae96aa97d22a6bdb75831a8a1218c79d3908" }
609+
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "aa03ae96aa97d22a6bdb75831a8a1218c79d3908" }
609610
multimap = "0.10.1"
610611
nexus-auth = { path = "nexus/auth" }
611612
nexus-background-task-interface = { path = "nexus/background-task-interface" }
@@ -742,7 +743,6 @@ rats-corim = { git = "https://github.com/oxidecomputer/rats-corim.git", rev = "f
742743
raw-cpuid = { git = "https://github.com/oxidecomputer/rust-cpuid.git", rev = "a4cf01df76f35430ff5d39dc2fe470bcb953503b" }
743744
rayon = "1.10"
744745
rcgen = "0.12.1"
745-
rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "974423895c17cc23711732f518e447b284425ccd" }
746746
reconfigurator-cli = { path = "dev-tools/reconfigurator-cli" }
747747
reedline = "0.40.0"
748748
ref-cast = "1.0"

nexus/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jiff.workspace = true
6363
lldpd_client.workspace = true
6464
macaddr.workspace = true
6565
maplit.workspace = true
66+
mg-api-types.workspace = true
6667
nexus-background-task-interface.workspace = true
6768
# Not under "dev-dependencies"; these also need to be implemented for
6869
# integration tests.
@@ -96,7 +97,6 @@ qorb.workspace = true
9697
rand.workspace = true
9798
range-requests.workspace = true
9899
ref-cast.workspace = true
99-
rdb-types.workspace = true
100100
regex.workspace = true
101101
reqwest = { workspace = true, features = ["http2", "json"] }
102102
reqwest012 = { workspace = true }

nexus/src/app/background/tasks/sync_switch_configuration.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,22 @@ use dpd_client::{Client as DpdClient, types as DpdTypes};
3030
use futures::FutureExt;
3131
use futures::future::BoxFuture;
3232
use mg_admin_client::types::{
33-
AddStaticRoute4Request, AddStaticRoute6Request, ApplyRequest,
34-
BestpathFanoutRequest, BgpPeerConfig, CheckerSource,
35-
DeleteStaticRoute4Request, DeleteStaticRoute6Request,
33+
ApplyRequest, BgpPeerConfig, UnnumberedBgpPeerConfig,
34+
};
35+
use mg_api_types::bgp::config::{
36+
CheckerSource, Ipv4UnicastConfig, Ipv6UnicastConfig, JitterRange,
37+
ShaperSource,
38+
};
39+
use mg_api_types::bgp::policy::{
3640
ImportExportPolicy4 as MgImportExportPolicy4,
37-
ImportExportPolicy6 as MgImportExportPolicy6, Ipv4UnicastConfig,
38-
Ipv6UnicastConfig, JitterRange, ShaperSource, StaticRoute4,
39-
StaticRoute4List, StaticRoute6, StaticRoute6List, UnnumberedBgpPeerConfig,
41+
ImportExportPolicy6 as MgImportExportPolicy6,
42+
};
43+
use mg_api_types::rdb::prefix::{Prefix, Prefix4, Prefix6};
44+
use mg_api_types::rib::BestpathFanoutRequest;
45+
use mg_api_types::static_routes::{
46+
AddStaticRoute4Request, AddStaticRoute6Request, DeleteStaticRoute4Request,
47+
DeleteStaticRoute6Request, StaticRoute4, StaticRoute4List, StaticRoute6,
48+
StaticRoute6List,
4049
};
4150
use nexus_db_queries::{
4251
context::OpContext,
@@ -49,7 +58,6 @@ use omicron_common::{
4958
address::{Ipv6Subnet, get_sled_address},
5059
api::external::{DataPageParams, Name},
5160
};
52-
use rdb_types::{Prefix, Prefix4, Prefix6};
5361
use serde_json::json;
5462
use sled_agent_client::types::HostPortConfig;
5563
use sled_agent_types::early_networking::BfdPeerConfig;
@@ -984,7 +992,7 @@ impl BackgroundTask for SwitchPortSettingsManager {
984992
"switch_slot" => ?switch_slot,
985993
"config" => ?config,
986994
);
987-
if let Err(e) = client.bgp_apply_v2(config).await {
995+
if let Err(e) = client.bgp_apply(config).await {
988996
error!(log, "error while applying bgp configuration"; "error" => ?e);
989997
}
990998

nexus/src/app/bgp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl super::Nexus {
177177

178178
for r in &router_info {
179179
let asn = r.asn;
180-
let selector = mg_admin_client::types::ExportedSelector {
180+
let selector = mg_api_types::bgp::session::ExportedSelector {
181181
afi: None,
182182
asn,
183183
peer: None,
@@ -199,12 +199,12 @@ impl super::Nexus {
199199
for (peer_id, exports) in exported {
200200
for ex in exports.iter() {
201201
let prefix = match ex {
202-
rdb_types::Prefix::V4(v4) => {
202+
mg_api_types::rdb::prefix::Prefix::V4(v4) => {
203203
oxnet::IpNet::V4(oxnet::Ipv4Net::new_unchecked(
204204
v4.value, v4.length,
205205
))
206206
}
207-
rdb_types::Prefix::V6(v6) => {
207+
mg_api_types::rdb::prefix::Prefix::V6(v6) => {
208208
oxnet::IpNet::V6(oxnet::Ipv6Net::new_unchecked(
209209
v6.value, v6.length,
210210
))

nexus/types/versions/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ daft.workspace = true
1616
dropshot.workspace = true
1717
http.workspace = true
1818
mg-admin-client.workspace = true
19+
mg-api-types.workspace = true
1920
omicron-common.workspace = true
2021
omicron-passwords.workspace = true
2122
omicron-uuid-kinds.workspace = true

nexus/types/versions/src/impls/networking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ impl From<IpNet> for latest::networking::AddressLotBlockCreate {
2323
}
2424
}
2525

26-
impl From<mg_admin_client::types::FsmStateKind>
26+
impl From<mg_api_types::bgp::session::FsmStateKind>
2727
for latest::networking::BgpPeerState
2828
{
29-
fn from(s: mg_admin_client::types::FsmStateKind) -> Self {
30-
use mg_admin_client::types::FsmStateKind;
29+
fn from(s: mg_api_types::bgp::session::FsmStateKind) -> Self {
30+
use mg_api_types::bgp::session::FsmStateKind;
3131
match s {
3232
FsmStateKind::Idle => Self::Idle,
3333
FsmStateKind::Connect => Self::Connect,

package-manifest.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,10 @@ source.repo = "maghemite"
683683
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
684684
# building `ddm-admin-client` (which will instruct you to update
685685
# `tools/maghemite_openapi_version`).
686-
source.commit = "974423895c17cc23711732f518e447b284425ccd"
686+
source.commit = "aa03ae96aa97d22a6bdb75831a8a1218c79d3908"
687687
# The SHA256 digest is automatically posted to:
688688
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm-gz.sha256.txt
689-
source.sha256 = "eed4c89343c29b42a74b16d74186c4e3c1a78701b0398ec2b81206122e4317d1"
689+
source.sha256 = "8db83f62eca7271b2f82d3c9d759debb12fae0bcb41ffb81bb03ff5b6486db3c"
690690
output.type = "tarball"
691691

692692
[package.mg-ddm]
@@ -699,10 +699,10 @@ source.repo = "maghemite"
699699
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
700700
# building `ddm-admin-client` (which will instruct you to update
701701
# `tools/maghemite_openapi_version`).
702-
source.commit = "974423895c17cc23711732f518e447b284425ccd"
702+
source.commit = "aa03ae96aa97d22a6bdb75831a8a1218c79d3908"
703703
# The SHA256 digest is automatically posted to:
704704
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm.sha256.txt
705-
source.sha256 = "ea97c636761cf7f622ddf0382ab365e68973604809eb6ebc93a0bbb94f758030"
705+
source.sha256 = "3686f448a825207fd2edfbf09f671785af962e43be946339d3497664041ba82e"
706706
output.type = "zone"
707707
output.intermediate_only = true
708708

@@ -714,10 +714,10 @@ source.repo = "maghemite"
714714
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
715715
# building `ddm-admin-client` (which will instruct you to update
716716
# `tools/maghemite_openapi_version`).
717-
source.commit = "974423895c17cc23711732f518e447b284425ccd"
717+
source.commit = "aa03ae96aa97d22a6bdb75831a8a1218c79d3908"
718718
# The SHA256 digest is automatically posted to:
719719
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mgd.sha256.txt
720-
source.sha256 = "69f6bc36806b799174897762f0b10885d600a747018d1f9dbf2caeae9c749841"
720+
source.sha256 = "5ff2470cc845be49ecb106a645f8f1b84e47275048086b4570597dcf6ecdef00"
721721
output.type = "zone"
722722
output.intermediate_only = true
723723

sled-agent/rack-setup/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ internal-dns-resolver.workspace = true
2929
internal-dns-types.workspace = true
3030
itertools.workspace = true
3131
mg-admin-client.workspace = true
32+
mg-api-types.workspace = true
3233
nexus-lockstep-client.workspace = true
3334
nexus-types.workspace = true
3435
ntp-admin-client.workspace = true
@@ -39,7 +40,6 @@ omicron-uuid-kinds.workspace = true
3940
omicron-workspace-hack.workspace = true
4041
oxnet.workspace = true
4142
rand = { workspace = true, features = ["os_rng"] }
42-
rdb-types.workspace = true
4343
reqwest = { workspace = true, features = ["rustls", "stream"] }
4444
schemars = { workspace = true, features = ["chrono", "uuid1"] }
4545
serde.workspace = true

0 commit comments

Comments
 (0)