Skip to content
Open
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
4 changes: 4 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions internal-dns/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ omicron-workspace-hack.workspace = true
omicron-uuid-kinds.workspace = true
schemars.workspace = true
serde.workspace = true
strum.workspace = true

[dev-dependencies]
expectorate.workspace = true
Expand Down
15 changes: 14 additions & 1 deletion internal-dns/types/src/names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! Well-known DNS names and related types for internal DNS (see RFD 248)

use omicron_uuid_kinds::{OmicronZoneUuid, SledUuid};
use strum::{EnumIter, IntoEnumIterator};

/// Name for the special boundary NTP DNS name
///
Expand Down Expand Up @@ -32,7 +33,9 @@ pub const DNS_ZONE_EXTERNAL_TESTING: &str = "oxide-dev.test";
pub const ZONE_APEX_NAME: &str = "@";

/// Names of services within the control plane
#[derive(Clone, Copy, Debug, Hash, Eq, Ord, PartialEq, PartialOrd)]
#[derive(
Clone, Copy, Debug, Hash, Eq, Ord, PartialEq, PartialOrd, EnumIter,
)]
pub enum ServiceName {
/// The HTTP interface to a single-node ClickHouse server.
Clickhouse,
Expand Down Expand Up @@ -78,6 +81,16 @@ pub enum ServiceName {
}

impl ServiceName {
/// Returns an iterator over all service name variants.
///
/// Service names with associated data, such as [`Self::SledAgent`] and
/// [`Self::Crucible`], will have default values associated with them. When
/// iterating over these service names, ensure that you provide the expected
/// values associated with them.
pub fn iter() -> impl Iterator<Item = Self> {
<Self as IntoEnumIterator>::iter()
}

fn service_kind(&self) -> &'static str {
match self {
ServiceName::Clickhouse => "clickhouse",
Expand Down
3 changes: 3 additions & 0 deletions nexus/reconfigurator/planning/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ uuid.workspace = true
omicron-workspace-hack.workspace = true

[dev-dependencies]
dns-server.workspace = true
dropshot.workspace = true
expectorate.workspace = true
hex-literal.workspace = true
hickory-resolver.workspace = true
internal-dns-types.workspace = true
maplit.workspace = true
omicron-common = { workspace = true, features = ["testing"] }
omicron-test-utils.workspace = true
Expand Down
Loading
Loading