Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 22 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ crucible-common = { git = "https://github.com/oxidecomputer/crucible", rev = "d2
# NOTE: See above!
csv = "1.3.1"
curve25519-dalek = "4"
daft = { git = "https://github.com/oxidecomputer/daft", branch = "main", features = ["newtype-uuid1", "oxnet01", "uuid1"] }
daft = { version = "0.1.1", features = ["derive", "newtype-uuid1", "oxnet01", "uuid1"] }
datatest-stable = "0.2.9"
display-error-chain = "0.2.2"
omicron-ddm-admin-client = { path = "clients/ddm-admin-client" }
Expand Down Expand Up @@ -451,7 +451,7 @@ ipcc = { path = "ipcc" }
ipnet = "2.9"
itertools = "0.13.0"
internet-checksum = "0.2"
ipnetwork = { version = "0.20", features = ["schemars"] }
ipnetwork = { version = "0.21", features = ["schemars", "serde"] }
ispf = { git = "https://github.com/oxidecomputer/ispf" }
key-manager = { path = "key-manager" }
kstat-rs = "0.2.4"
Expand All @@ -466,8 +466,8 @@ macaddr = { version = "1.0.1", features = ["serde_std"] }
maplit = "1.0.2"
mockall = "0.13"
newtype_derive = "0.1.6"
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "93cd0d642cf1b58f9f4528275e2a2aa758e9feb3" }
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "93cd0d642cf1b58f9f4528275e2a2aa758e9feb3" }
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "cb2b592e890ca9e93d8193e9765e2a62459d5fa8" }
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "cb2b592e890ca9e93d8193e9765e2a62459d5fa8" }
multimap = "0.10.0"
nexus-auth = { path = "nexus/auth" }
nexus-client = { path = "clients/nexus-client" }
Expand Down Expand Up @@ -515,17 +515,17 @@ omicron-test-utils = { path = "test-utils" }
omicron-workspace-hack = "0.1.0"
omicron-zone-package = "0.12.0"
oxide-client = { path = "clients/oxide-client" }
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "b56afeeb14e0042cbd7bda85b166ed86ee17820e", features = [ "api", "std" ] }
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "cd9aa6467c5e62c6d97f6aafa2150d6930e3a0fa", features = [ "api", "std" ] }
oxlog = { path = "dev-tools/oxlog" }
oxnet = { git = "https://github.com/oxidecomputer/oxnet" }
oxnet = "0.1.0"
once_cell = "1.20.2"
openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" }
openapi-manager-types = { path = "dev-tools/openapi-manager/types" }
openapiv3 = "2.0.0"
# must match samael's crate!
openssl = "0.10"
openssl-sys = "0.9"
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "b56afeeb14e0042cbd7bda85b166ed86ee17820e" }
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "cd9aa6467c5e62c6d97f6aafa2150d6930e3a0fa" }
oso = "0.27"
owo-colors = "4.1.0"
oximeter = { path = "oximeter/oximeter" }
Expand Down
10 changes: 5 additions & 5 deletions common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use anyhow::Context;
use api_identity::ObjectIdentity;
use chrono::DateTime;
use chrono::Utc;
use daft::{leaf, Diffable};
use daft::Diffable;
use dropshot::HttpError;
pub use dropshot::PaginationOrder;
pub use error::*;
Expand Down Expand Up @@ -758,11 +758,11 @@ impl From<ByteCount> for i64 {
PartialEq,
PartialOrd,
Serialize,
Diffable,
)]
#[daft(leaf)]
pub struct Generation(u64);

leaf!(Generation);

impl Generation {
// `as` is a little distasteful because it allows lossy conversion, but we
// know converting `i64::MAX` to `u64` will always succeed losslessly.
Expand Down Expand Up @@ -1981,11 +1981,11 @@ impl JsonSchema for L4PortRange {
Ord,
SerializeDisplay,
Hash,
Diffable,
)]
#[daft(leaf)]
pub struct MacAddr(pub macaddr::MacAddr6);

leaf!(MacAddr);

impl MacAddr {
// Guest MAC addresses begin with the Oxide OUI A8:40:25. Further, guest
// address are constrained to be in the virtual address range
Expand Down
7 changes: 3 additions & 4 deletions common/src/zpool_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Zpool labels and kinds shared between Nexus and Sled Agents

use camino::{Utf8Path, Utf8PathBuf};
use daft::{leaf, Diffable};
use daft::Diffable;
use omicron_uuid_kinds::ZpoolUuid;
use schemars::JsonSchema;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
Expand Down Expand Up @@ -39,14 +39,13 @@ pub enum ZpoolKind {
///
/// This expects that the format will be: `ox{i,p}_<UUID>` - we parse the prefix
/// when reading the structure, and validate that the UUID can be utilized.
#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Diffable)]
#[daft(leaf)]
pub struct ZpoolName {
id: ZpoolUuid,
kind: ZpoolKind,
}

leaf!(ZpoolName);

const ZPOOL_NAME_REGEX: &str = r"^ox[ip]_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";

/// Custom JsonSchema implementation to encode the constraints on Name.
Expand Down
1 change: 0 additions & 1 deletion dev-tools/ls-apis/tests/api_dependencies.out
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ Repo Depot API (client: repo-depot-client)
consumed by: omicron-sled-agent (omicron/sled-agent) via 1 path

Sled Agent (client: sled-agent-client)
consumed by: dpd (dendrite/dpd) via 1 path
consumed by: omicron-nexus (omicron/nexus) via 7 paths

Wicketd (client: wicketd-client)
Expand Down
27 changes: 14 additions & 13 deletions nexus/reconfigurator/planning/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ mod test {
// No removed or modified zones on this sled
let zones_cfg_diff = summary.zones_on_modified_sled(sled_id).unwrap();
assert!(zones_cfg_diff.zones.removed.is_empty());
assert!(zones_cfg_diff.zones.modified.is_empty());
assert_eq!(zones_cfg_diff.zones.modified().count(), 0);
// 10 crucible zones addeed
assert_eq!(
*zones_cfg_diff.generation.after,
Expand Down Expand Up @@ -1193,7 +1193,7 @@ mod test {
.contains_key(sled_id));
let zones_cfg_diff =
summary.zones_on_modified_sled(sled_id).unwrap();
assert!(zones_cfg_diff.zones.modified.is_empty());
assert_eq!(zones_cfg_diff.zones.modified().count(), 0);
let zones_added = &zones_cfg_diff.zones.added;
match zones_added.len() {
n @ (3 | 4) => {
Expand Down Expand Up @@ -1321,7 +1321,7 @@ mod test {
let zones_diff =
&summary.zones_on_modified_sled(&sled_id).unwrap().zones;
assert!(zones_diff.removed.is_empty());
assert!(zones_diff.modified.is_empty());
assert_eq!(zones_diff.modified().count(), 0);
let zones_added = &zones_diff.added;
match zones_added.len() {
0 => {}
Expand Down Expand Up @@ -1895,10 +1895,10 @@ mod test {
DatasetKind::TransientZoneRoot,
test_transient_zone_kind.clone(),
]);
for (_, sled_with_modified_datasets) in
&summary.diff.blueprint_datasets.modified
for (_, sled_with_modified_datasets) in &summary.modified_datasets_diff
{
for (_, modified) in &sled_with_modified_datasets.datasets.modified
for modified in
sled_with_modified_datasets.datasets.modified_values_diff()
{
assert_eq!(
*modified.disposition.before,
Expand All @@ -1921,10 +1921,10 @@ mod test {
assert!(expected_kinds.is_empty());

let (_zone_id, modified_zones) =
summary.diff.blueprint_zones.modified.iter().next().unwrap();
assert_eq!(modified_zones.zones.modified.len(), 1);
summary.modified_zones_diff.iter().next().unwrap();
assert_eq!(modified_zones.zones.modified().count(), 1);
let (_, modified_zone) =
&modified_zones.zones.modified.first_key_value().unwrap();
&modified_zones.zones.modified_diff().next().unwrap();
assert!(
matches!(modified_zone.zone_type.before.kind(), ZoneKind::Crucible),
"Expected the modified zone to be a Crucible zone, but it was: {:?}",
Expand Down Expand Up @@ -2044,18 +2044,19 @@ mod test {
assert_eq!(summary.total_zones_modified(), 6);

let (_zone_id, zones_on_a_modified_sled) =
summary.diff.blueprint_zones.modified.iter().next().unwrap();
summary.modified_zones_diff.iter().next().unwrap();
let added_zones = &zones_on_a_modified_sled.zones.added;
assert_eq!(added_zones.len(), 1);
for (_, zone) in added_zones {
assert_eq!(zone.kind(), ZoneKind::InternalNtp);
}

assert_eq!(
zones_on_a_modified_sled.zones.modified.len(),
zones_on_a_modified_sled.zones.modified().count(),
zones_using_zpool
);
for (_, modified_zone) in &zones_on_a_modified_sled.zones.modified {
for (_, modified_zone) in zones_on_a_modified_sled.zones.modified_diff()
{
assert_eq!(
*modified_zone.disposition.after,
BlueprintZoneDisposition::Expunged,
Expand Down Expand Up @@ -2380,7 +2381,7 @@ mod test {
"for {desc}, generation should have been bumped"
);

for (_, modified_zone) in &modified_zones.zones.modified {
for modified_zone in modified_zones.zones.modified_values_diff() {
assert_eq!(
*modified_zone.disposition.after,
BlueprintZoneDisposition::Expunged,
Expand Down
Loading
Loading