Skip to content

Commit

Permalink
Merge branch 'main' into dendrite-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
oxide-reflector-bot[bot] committed Dec 1, 2023
2 parents 4ae7f6f + 3349a19 commit 827a71b
Show file tree
Hide file tree
Showing 189 changed files with 15,669 additions and 3,745 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@c1dd9c9e59427252db32b9ece987f4eebc3a021a # v2
uses: taiki-e/install-action@6b385b7509c65e9d1b7d6b72244f7e275a7f5cef # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
44 changes: 24 additions & 20 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ petgraph = "0.6.4"
postgres-protocol = "0.6.6"
predicates = "3.0.4"
pretty_assertions = "1.4.0"
pretty-hex = "0.3.0"
pretty-hex = "0.4.0"
proc-macro2 = "1.0"
progenitor = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
progenitor-client = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
Expand Down Expand Up @@ -389,7 +389,7 @@ walkdir = "2.4"
wicket = { path = "wicket" }
wicket-common = { path = "wicket-common" }
wicketd-client = { path = "clients/wicketd-client" }
zeroize = { version = "1.6.0", features = ["zeroize_derive", "std"] }
zeroize = { version = "1.7.0", features = ["zeroize_derive", "std"] }
zip = { version = "0.6.6", default-features = false, features = ["deflate","bzip2"] }
zone = { version = "0.3", default-features = false, features = ["async"] }

Expand Down
2 changes: 1 addition & 1 deletion clients/nexus-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl From<&omicron_common::api::internal::nexus::ProducerEndpoint>
address: s.address.to_string(),
base_route: s.base_route.clone(),
id: s.id,
kind: s.kind.map(Into::into),
kind: s.kind.into(),
interval: s.interval.into(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion clients/oximeter-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl From<&omicron_common::api::internal::nexus::ProducerEndpoint>
address: s.address.to_string(),
base_route: s.base_route.clone(),
id: s.id,
kind: s.kind.map(Into::into),
kind: s.kind.into(),
interval: s.interval.into(),
}
}
Expand Down
1 change: 1 addition & 0 deletions clients/sled-agent-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ progenitor.workspace = true
ipnetwork.workspace = true
regress.workspace = true
reqwest = { workspace = true, features = [ "json", "rustls-tls", "stream" ] }
schemars.workspace = true
serde.workspace = true
slog.workspace = true
sled-storage.workspace = true
Expand Down
26 changes: 1 addition & 25 deletions clients/sled-agent-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
use async_trait::async_trait;
use std::convert::TryFrom;
use std::str::FromStr;
use uuid::Uuid;

progenitor::generate_api!(
spec = "../../openapi/sled-agent.json",
derives = [ schemars::JsonSchema ],
inner_type = slog::Logger,
pre_hook = (|log: &slog::Logger, request: &reqwest::Request| {
slog::debug!(log, "client request";
Expand Down Expand Up @@ -529,27 +529,3 @@ impl TestInterfaces for Client {
.expect("disk_finish_transition() failed unexpectedly");
}
}

impl From<sled_storage::dataset::DatasetKind> for types::DatasetKind {
fn from(k: sled_storage::dataset::DatasetKind) -> Self {
use sled_storage::dataset::DatasetKind::*;
match k {
CockroachDb => Self::CockroachDb,
Crucible => Self::Crucible,
Clickhouse => Self::Clickhouse,
ClickhouseKeeper => Self::ClickhouseKeeper,
ExternalDns => Self::ExternalDns,
InternalDns => Self::InternalDns,
}
}
}

impl From<sled_storage::dataset::DatasetName> for types::DatasetName {
fn from(n: sled_storage::dataset::DatasetName) -> Self {
Self {
pool_name: types::ZpoolName::from_str(&n.pool().to_string())
.unwrap(),
kind: n.dataset().clone().into(),
}
}
}
1 change: 1 addition & 0 deletions common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ impl From<ByteCount> for i64 {
Debug,
Deserialize,
Eq,
Hash,
JsonSchema,
Ord,
PartialEq,
Expand Down
2 changes: 1 addition & 1 deletion common/src/api/internal/nexus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct ProducerEndpoint {
/// A unique ID for this producer.
pub id: Uuid,
/// The kind of producer.
pub kind: Option<ProducerKind>,
pub kind: ProducerKind,
/// The IP address and port at which `oximeter` can collect metrics from the
/// producer.
pub address: SocketAddr,
Expand Down
8 changes: 6 additions & 2 deletions common/src/api/internal/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ pub struct PortConfigV1 {
pub uplink_port_fec: PortFec,
/// BGP peers on this port
pub bgp_peers: Vec<BgpPeerConfig>,
/// Whether or not to set autonegotiation
#[serde(default)]
pub autoneg: bool,
}

impl From<UplinkConfig> for PortConfigV1 {
Expand All @@ -155,6 +158,7 @@ impl From<UplinkConfig> for PortConfigV1 {
uplink_port_speed: value.uplink_port_speed,
uplink_port_fec: value.uplink_port_fec,
bgp_peers: vec![],
autoneg: false,
}
}
}
Expand Down Expand Up @@ -260,7 +264,7 @@ pub enum ExternalPortDiscovery {
}

/// Switchport Speed options
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)]
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PortSpeed {
#[serde(alias = "0G")]
Expand All @@ -284,7 +288,7 @@ pub enum PortSpeed {
}

/// Switchport FEC options
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)]
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PortFec {
Firecode,
Expand Down
1 change: 1 addition & 0 deletions common/src/ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ impl From<Error> for crate::api::external::Error {
///
/// This structure is intended to help with serialization and deserialization
/// of configuration information to both M.2s.
#[derive(Debug)]
pub struct Ledger<T> {
log: Logger,
ledger: T,
Expand Down
1 change: 1 addition & 0 deletions illumos-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async-trait.workspace = true
bhyve_api.workspace = true
byteorder.workspace = true
camino.workspace = true
camino-tempfile.workspace = true
cfg-if.workspace = true
crucible-smf.workspace = true
futures.workspace = true
Expand Down
Loading

0 comments on commit 827a71b

Please sign in to comment.