Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
karencfv committed Aug 15, 2024
1 parent 7f37f2d commit ab361ba
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
3 changes: 0 additions & 3 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,8 @@ source.type = "local"
source.rust.binary_names = ["oximeter", "clickhouse-schema-updater"]
source.rust.release = true
source.paths = [
#{ from = "smf/oximeter", to = "/var/svc/manifest/site/oximeter" },
{ from = "oximeter/db/schema", to = "/opt/oxide/oximeter/schema" },
{ from = "smf/oximeter/config.toml", to = "/var/svc/manifest/site/oximeter/config.toml" },
# TODO: Add something like rack-topology (slingle-sled vs multi-sled) to add `--replicated`?
# Example:
{ from = "smf/oximeter/{{clickhouse-topology}}/manifest.xml", to = "/var/svc/manifest/site/oximeter/manifest.xml" },
]
output.type = "zone"
Expand Down
12 changes: 10 additions & 2 deletions package/src/bin/omicron-package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,21 @@ async fn do_target(
format!("failed to create directory {}", target_dir)
})?;
match subcommand {
TargetCommand::Create { image, machine, switch, rack_topology, clickhouse_topology } => {
TargetCommand::Create {
image,
machine,
switch,
rack_topology,
clickhouse_topology,
} => {
let target = KnownTarget::new(
image.clone(),
machine.clone(),
switch.clone(),
rack_topology.clone(),
clickhouse_topology.clone().expect("clickhouse topology should never be NONE")
clickhouse_topology
.clone()
.expect("clickhouse topology should never be NONE"),
)?;

let path = get_single_target(&target_dir, name).await?;
Expand Down
2 changes: 1 addition & 1 deletion package/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub enum TargetCommand {
)]
/// Specify whether clickhouse will be deployed as a replicated cluster
/// or single-node configuration.
///
///
/// Replicated cluster configuration is an experimental feature to be
/// used only for testing.
clickhouse_topology: Option<crate::target::ClickhouseTopology>,
Expand Down
5 changes: 4 additions & 1 deletion package/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ impl From<KnownTarget> for Target {
map.insert("switch".to_string(), switch.to_string());
}
map.insert("rack-topology".to_string(), kt.rack_topology.to_string());
map.insert("clickhouse-topology".to_string(), kt.clickhouse_topology.to_string());
map.insert(
"clickhouse-topology".to_string(),
kt.clickhouse_topology.to_string(),
);
Target(map)
}
}
Expand Down

0 comments on commit ab361ba

Please sign in to comment.