Skip to content

Commit

Permalink
[π˜€π—½π—Ώ] initial version
Browse files Browse the repository at this point in the history
Created using spr 1.3.6-beta.1
  • Loading branch information
sunshowers committed Jul 13, 2024
2 parents fe60eb9 + 85ebaf5 commit 4c8548a
Show file tree
Hide file tree
Showing 67 changed files with 3,242 additions and 2,294 deletions.
58 changes: 37 additions & 21 deletions Cargo.lock

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

17 changes: 10 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [
"clients/dns-service-client",
"clients/dpd-client",
"clients/gateway-client",
"clients/installinator-artifact-client",
"clients/installinator-client",
"clients/nexus-client",
"clients/oxide-client",
"clients/oximeter-client",
Expand All @@ -31,7 +31,7 @@ members = [
"gateway-test-utils",
"gateway",
"illumos-utils",
"installinator-artifactd",
"installinator-api",
"installinator-common",
"installinator",
"internal-dns-cli",
Expand Down Expand Up @@ -86,8 +86,9 @@ members = [
"wicket-dbg",
"wicket",
"wicketd",
"wicketd-api",
"workspace-hack",
"zone-setup",
"zone-setup", "wicketd-api",
]

default-members = [
Expand All @@ -100,7 +101,7 @@ default-members = [
"clients/dns-service-client",
"clients/dpd-client",
"clients/gateway-client",
"clients/installinator-artifact-client",
"clients/installinator-client",
"clients/nexus-client",
"clients/oxide-client",
"clients/oximeter-client",
Expand All @@ -125,7 +126,7 @@ default-members = [
"gateway-test-utils",
"gateway",
"illumos-utils",
"installinator-artifactd",
"installinator-api",
"installinator-common",
"installinator",
"internal-dns-cli",
Expand Down Expand Up @@ -180,6 +181,7 @@ default-members = [
"wicket-dbg",
"wicket",
"wicketd",
"wicketd-api",
"workspace-hack",
"zone-setup",
]
Expand Down Expand Up @@ -318,8 +320,8 @@ indent_write = "2.2.0"
indexmap = "2.2.6"
indicatif = { version = "0.17.8", features = ["rayon"] }
installinator = { path = "installinator" }
installinator-artifactd = { path = "installinator-artifactd" }
installinator-artifact-client = { path = "clients/installinator-artifact-client" }
installinator-api = { path = "installinator-api" }
installinator-client = { path = "clients/installinator-client" }
installinator-common = { path = "installinator-common" }
internal-dns = { path = "internal-dns" }
ipcc = { path = "ipcc" }
Expand Down Expand Up @@ -530,6 +532,7 @@ walkdir = "2.5"
whoami = "1.5"
wicket = { path = "wicket" }
wicket-common = { path = "wicket-common" }
wicketd-api = { path = "wicketd-api" }
wicketd-client = { path = "clients/wicketd-client" }
zeroize = { version = "1.7.0", features = ["zeroize_derive", "std"] }
zip = { version = "0.6.6", default-features = false, features = ["deflate","bzip2"] }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "installinator-artifact-client"
name = "installinator-client"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Interface for making API requests to installinator-artifactd.
//! Interface for installinator to make API requests.
progenitor::generate_api!(
spec = "../../openapi/installinator-artifactd.json",
spec = "../../openapi/installinator.json",
inner_type = slog::Logger,
pre_hook = (|log: &slog::Logger, request: &reqwest::Request| {
slog::debug!(log, "client request";
Expand Down
18 changes: 14 additions & 4 deletions clients/wicketd-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ progenitor::generate_api!(
RackNetworkConfigV2 = { derives = [PartialEq, Eq, PartialOrd, Ord] },
RackOperationStatus = { derives = [PartialEq, Eq, PartialOrd, Ord] },
RackResetId = { derives = [PartialEq, Eq, PartialOrd, Ord] },
RackV1Inventory = { derives = [PartialEq, Eq, PartialOrd, Ord]},
RotImageDetails = { derives = [PartialEq, Eq, PartialOrd, Ord]},
RotInventory = { derives = [PartialEq, Eq, PartialOrd, Ord]},
RotSlot = { derives = [PartialEq, Eq, PartialOrd, Ord]},
Expand All @@ -36,12 +35,12 @@ progenitor::generate_api!(
SpComponentInfo = { derives = [PartialEq, Eq, PartialOrd, Ord]},
SpIgnition = { derives = [PartialEq, Eq, PartialOrd, Ord]},
SpIgnitionSystemType= { derives = [PartialEq, Eq, PartialOrd, Ord]},
SpInventory = { derives = [PartialEq, Eq, PartialOrd, Ord]},
SpState = { derives = [PartialEq, Eq, PartialOrd, Ord] },
StartUpdateOptions = { derives = [Default]},
UplinkConfig = { derives = [PartialEq, Eq, PartialOrd, Ord] },
},
replace = {
AbortUpdateOptions = wicket_common::rack_update::AbortUpdateOptions,
AllowedSourceIps = omicron_common::api::internal::shared::AllowedSourceIps,
Baseboard = sled_hardware_types::Baseboard,
BgpAuthKey = wicket_common::rack_setup::BgpAuthKey,
Expand All @@ -52,9 +51,11 @@ progenitor::generate_api!(
BgpPeerAuthKind = wicket_common::rack_setup::BgpPeerAuthKind,
BgpPeerConfig = omicron_common::api::internal::shared::BgpPeerConfig,
BootstrapSledDescription = wicket_common::rack_setup::BootstrapSledDescription,
ClearUpdateStateOptions = wicket_common::rack_update::ClearUpdateStateOptions,
ClearUpdateStateResponse = wicket_common::rack_update::ClearUpdateStateResponse,
CurrentRssUserConfigInsensitive = wicket_common::rack_setup::CurrentRssUserConfigInsensitive,
Duration = std::time::Duration,
EventReportForUplinkPreflightCheckSpec = wicket_common::preflight_check::EventReport,
EventReportForWicketdEngineSpec = wicket_common::update_events::EventReport,
GetBgpAuthKeyInfoResponse = wicket_common::rack_setup::GetBgpAuthKeyInfoResponse,
ImportExportPolicy = omicron_common::api::internal::shared::ImportExportPolicy,
Expand All @@ -67,15 +68,24 @@ progenitor::generate_api!(
PortSpeed = omicron_common::api::internal::shared::PortSpeed,
ProgressEventForGenericSpec = update_engine::events::ProgressEvent<update_engine::NestedSpec>,
ProgressEventForInstallinatorSpec = installinator_common::ProgressEvent,
ProgressEventForUplinkPreflightSpec = wicket_common::preflight_check::ProgressEvent,
ProgressEventForWicketdEngineSpec = wicket_common::update_events::ProgressEvent,
PutRssUserConfigInsensitive = wicket_common::rack_setup::PutRssUserConfigInsensitive,
RackV1Inventory = wicket_common::inventory::RackV1Inventory,
RotInventory = wicket_common::inventory::RotInventory,
RouteConfig = omicron_common::api::internal::shared::RouteConfig,
SpIdentifier = wicket_common::rack_update::SpIdentifier,
SpType = wicket_common::rack_update::SpType,
SpIdentifier = wicket_common::inventory::SpIdentifier,
SpInventory = wicket_common::inventory::SpInventory,
SpType = wicket_common::inventory::SpType,
StartUpdateOptions = wicket_common::rack_update::StartUpdateOptions,
StepEventForGenericSpec = update_engine::events::StepEvent<update_engine::NestedSpec>,
StepEventForUplinkPreflightSpec = wicket_common::preflight_check::StepEvent,
StepEventForInstallinatorSpec = installinator_common::StepEvent,
StepEventForWicketdEngineSpec = wicket_common::update_events::StepEvent,
SwitchLocation = omicron_common::api::internal::shared::SwitchLocation,
UpdateSimulatedResult = wicket_common::rack_update::UpdateSimulatedResult,
UpdateTestError = wicket_common::rack_update::UpdateTestError,
UplinkPreflightStepId = wicket_common::preflight_check::UplinkPreflightStepId,
UserSpecifiedBgpPeerConfig = wicket_common::rack_setup::UserSpecifiedBgpPeerConfig,
UserSpecifiedImportExportPolicy = wicket_common::rack_setup::UserSpecifiedImportExportPolicy,
UserSpecifiedPortConfig = wicket_common::rack_setup::UserSpecifiedPortConfig,
Expand Down
2 changes: 2 additions & 0 deletions dev-tools/openapi-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ clap.workspace = true
dropshot.workspace = true
fs-err.workspace = true
indent_write.workspace = true
installinator-api.workspace = true
nexus-internal-api.workspace = true
omicron-workspace-hack.workspace = true
openapiv3.workspace = true
Expand All @@ -23,3 +24,4 @@ owo-colors.workspace = true
serde_json.workspace = true
similar.workspace = true
supports-color.workspace = true
wicketd-api.workspace = true
22 changes: 22 additions & 0 deletions dev-tools/openapi-manager/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ use openapiv3::OpenAPI;
/// All APIs managed by openapi-manager.
pub fn all_apis() -> Vec<ApiSpec> {
vec![
ApiSpec {
title: "Installinator API".to_string(),
version: "0.0.1".to_string(),
description: "API for installinator to fetch artifacts \
and report progress"
.to_string(),
boundary: ApiBoundary::Internal,
api_description:
installinator_api::installinator_api::stub_api_description,
filename: "installinator.json".to_string(),
extra_validation: None,
},
ApiSpec {
title: "Nexus internal API".to_string(),
version: "0.0.1".to_string(),
Expand All @@ -24,6 +36,16 @@ pub fn all_apis() -> Vec<ApiSpec> {
filename: "nexus-internal.json".to_string(),
extra_validation: None,
},
ApiSpec {
title: "Oxide Technician Port Control Service".to_string(),
version: "0.0.1".to_string(),
description: "API for use by the technician port TUI: wicket"
.to_string(),
boundary: ApiBoundary::Internal,
api_description: wicketd_api::wicketd_api_mod::stub_api_description,
filename: "wicketd.json".to_string(),
extra_validation: None,
},
// Add your APIs here! Please keep this list sorted by filename.
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "installinator-artifactd"
name = "installinator-api"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
Expand All @@ -9,24 +9,12 @@ workspace = true

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
clap.workspace = true
dropshot.workspace = true
hyper.workspace = true
installinator-common.workspace = true
omicron-common.workspace = true
omicron-workspace-hack.workspace = true
schemars.workspace = true
serde.workspace = true
serde_json.workspace = true
slog.workspace = true
uuid.workspace = true

installinator-common.workspace = true
omicron-common.workspace = true
omicron-workspace-hack.workspace = true

[dev-dependencies]
expectorate.workspace = true
omicron-test-utils.workspace = true
openapiv3.workspace = true
openapi-lint.workspace = true
serde_json.workspace = true
subprocess.workspace = true
Loading

0 comments on commit 4c8548a

Please sign in to comment.