Skip to content

Commit

Permalink
ServiceZoneRequest is too general (#4466)
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco authored Nov 30, 2023
1 parent 7ef3631 commit e3887d5
Show file tree
Hide file tree
Showing 104 changed files with 12,950 additions and 3,013 deletions.
1 change: 1 addition & 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 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
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
Loading

0 comments on commit e3887d5

Please sign in to comment.