diff --git a/Cargo.toml b/Cargo.toml index 2748f7ee209..67884d4033d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ members = [ "clients/dpd-client", "clients/gateway-client", "clients/installinator-artifact-client", + "clients/mg-admin-client", "clients/nexus-client", "clients/oxide-client", "clients/oximeter-client", @@ -21,7 +22,6 @@ members = [ "dev-tools/omicron-dev", "dev-tools/thing-flinger", "dev-tools/xtask", - "mg-admin-client", "dns-server", "end-to-end-tests", "gateway-cli", @@ -83,13 +83,13 @@ default-members = [ "clients/oximeter-client", "clients/sled-agent-client", "clients/wicketd-client", + "clients/mg-admin-client", "common", "dev-tools/crdb-seed", "dev-tools/omdb", "dev-tools/omicron-dev", "dev-tools/thing-flinger", "dev-tools/xtask", - "mg-admin-client", "dns-server", "gateway-cli", "gateway-test-utils", @@ -228,7 +228,7 @@ macaddr = { version = "1.0.1", features = ["serde_std"] } mime_guess = "2.0.4" mockall = "0.11" newtype_derive = "0.1.6" -mg-admin-client = { path = "mg-admin-client" } +mg-admin-client = { path = "clients/mg-admin-client" } nexus-client = { path = "clients/nexus-client" } nexus-db-model = { path = "nexus/db-model" } nexus-db-queries = { path = "nexus/db-queries" } diff --git a/mg-admin-client/Cargo.toml b/clients/mg-admin-client/Cargo.toml similarity index 100% rename from mg-admin-client/Cargo.toml rename to clients/mg-admin-client/Cargo.toml diff --git a/mg-admin-client/build.rs b/clients/mg-admin-client/build.rs similarity index 86% rename from mg-admin-client/build.rs rename to clients/mg-admin-client/build.rs index 25dc1a01286..dcc7ae61cbc 100644 --- a/mg-admin-client/build.rs +++ b/clients/mg-admin-client/build.rs @@ -16,22 +16,23 @@ use std::path::Path; fn main() -> Result<()> { // Find the current maghemite repo commit from our package manifest. - let manifest = fs::read_to_string("../package-manifest.toml") - .context("failed to read ../package-manifest.toml")?; - println!("cargo:rerun-if-changed=../package-manifest.toml"); + let manifest = fs::read_to_string("../../package-manifest.toml") + .context("failed to read ../../package-manifest.toml")?; + println!("cargo:rerun-if-changed=../../package-manifest.toml"); let config: Config = toml::from_str(&manifest) - .context("failed to parse ../package-manifest.toml")?; + .context("failed to parse ../../package-manifest.toml")?; let mg = config .packages .get("mgd") - .context("missing mgd package in ../package-manifest.toml")?; + .context("missing mgd package in ../../package-manifest.toml")?; let local_path = match &mg.source { PackageSource::Prebuilt { commit, .. } => { // Report a relatively verbose error if we haven't downloaded the requisite // openapi spec. - let local_path = format!("../out/downloads/mg-admin-{commit}.json"); + let local_path = + format!("../../out/downloads/mg-admin-{commit}.json"); if !Path::new(&local_path).exists() { bail!("{local_path} doesn't exist; rerun `tools/ci_download_maghemite_openapi` (after updating `tools/maghemite_mg_openapi_version` if the maghemite commit in package-manifest.toml has changed)"); } @@ -41,7 +42,7 @@ fn main() -> Result<()> { PackageSource::Manual => { let local_path = - "../out/downloads/mg-admin-manual.json".to_string(); + "../../out/downloads/mg-admin-manual.json".to_string(); if !Path::new(&local_path).exists() { bail!("{local_path} doesn't exist, please copy manually built mg-admin.json there!"); } diff --git a/mg-admin-client/src/lib.rs b/clients/mg-admin-client/src/lib.rs similarity index 100% rename from mg-admin-client/src/lib.rs rename to clients/mg-admin-client/src/lib.rs