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 23, 2024
1 parent 38575ab commit 0f062ea
Show file tree
Hide file tree
Showing 36 changed files with 2,532 additions and 2,276 deletions.
34 changes: 33 additions & 1 deletion Cargo.lock

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

10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ members = [
"dns-server",
"dns-server-api",
"end-to-end-tests",
"gateway",
"gateway-api",
"gateway-cli",
"gateway-test-utils",
"gateway",
"gateway-types",
"illumos-utils",
"installinator-api",
"installinator-common",
Expand Down Expand Up @@ -132,9 +134,11 @@ default-members = [
"dns-server-api",
# Do not include end-to-end-tests in the list of default members, as its
# tests only work on a deployed control plane.
"gateway",
"gateway-api",
"gateway-cli",
"gateway-test-utils",
"gateway",
"gateway-types",
"illumos-utils",
"installinator-api",
"installinator-common",
Expand Down Expand Up @@ -313,10 +317,12 @@ flume = "0.11.0"
foreign-types = "0.3.2"
fs-err = "2.11.0"
futures = "0.3.30"
gateway-api = { path = "gateway-api" }
gateway-client = { path = "clients/gateway-client" }
gateway-messages = { git = "https://github.com/oxidecomputer/management-gateway-service", rev = "c85a4ca043aaa389df12aac5348d8a3feda28762", default-features = false, features = ["std"] }
gateway-sp-comms = { git = "https://github.com/oxidecomputer/management-gateway-service", rev = "c85a4ca043aaa389df12aac5348d8a3feda28762" }
gateway-test-utils = { path = "gateway-test-utils" }
gateway-types = { path = "gateway-types" }
gethostname = "0.4.3"
glob = "0.3.1"
guppy = "0.17.5"
Expand Down
11 changes: 11 additions & 0 deletions clients/gateway-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ pub use gateway_messages::SpComponent;
// If the format of inventory data desired by wicket or nexus changes such that
// it is no longer useful to directly expose the JsonSchema types, we can go
// back to reusing `omicron_common`.
//
// As another alternative, since the `derives` and `patch` directives were
// introduced, these types have moved to living in gateway-types. This means
// that we can choose to use `replace` on them. That hasn't felt necessary so
// far, but it's an option if it becomes desirable in the future. (One reason
// to do that might be that currently, `nexus-types` depends on
// `gateway-client`. Generally we expect the `-client` layer to depend on the
// `-types` layer to avoid a circular dependency, and we've had to resolve a
// rather thorny one between Nexus and sled-agent. But Nexus and sled-agent
// call into each other. Since `gateway` is a lower-level service and never
// calls into Nexus, the current scheme is okay.)
progenitor::generate_api!(
spec = "../../openapi/gateway.json",
inner_type = slog::Logger,
Expand Down
1 change: 1 addition & 0 deletions dev-tools/openapi-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ clap.workspace = true
dns-server-api.workspace = true
dropshot.workspace = true
fs-err.workspace = true
gateway-api.workspace = true
indent_write.workspace = true
installinator-api.workspace = true
nexus-internal-api.workspace = true
Expand Down
23 changes: 17 additions & 6 deletions dev-tools/openapi-manager/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,36 @@ use openapiv3::OpenAPI;
/// All APIs managed by openapi-manager.
pub fn all_apis() -> Vec<ApiSpec> {
vec![
ApiSpec {
title: "Bootstrap Agent API",
version: "0.0.1",
description: "Per-sled API for setup and teardown",
boundary: ApiBoundary::Internal,
api_description:
bootstrap_agent_api::bootstrap_agent_api_mod::stub_api_description,
filename: "bootstrap-agent.json",
extra_validation: None,
},
ApiSpec {
title: "CockroachDB Cluster Admin API",
version: "0.0.1",
description: "API for interacting with the Oxide control plane's \
CockroachDB cluster",
description: "API for interacting with the Oxide \
control plane's CockroachDB cluster",
boundary: ApiBoundary::Internal,
api_description:
cockroach_admin_api::cockroach_admin_api_mod::stub_api_description,
filename: "cockroach-admin.json",
extra_validation: None,
},
ApiSpec {
title: "Bootstrap Agent API",
title: "Oxide Management Gateway Service API",
version: "0.0.1",
description: "Per-sled API for setup and teardown",
description: "API for interacting with the Oxide \
control plane's gateway service",
boundary: ApiBoundary::Internal,
api_description:
bootstrap_agent_api::bootstrap_agent_api_mod::stub_api_description,
filename: "bootstrap-agent.json",
gateway_api::gateway_api_mod::stub_api_description,
filename: "gateway.json",
extra_validation: None,
},
ApiSpec {
Expand Down
18 changes: 18 additions & 0 deletions gateway-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "gateway-api"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"

[lints]
workspace = true

[dependencies]
dropshot.workspace = true
gateway-types.workspace = true
omicron-common.workspace = true
omicron-uuid-kinds.workspace = true
omicron-workspace-hack.workspace = true
schemars.workspace = true
serde.workspace = true
uuid.workspace = true
Loading

0 comments on commit 0f062ea

Please sign in to comment.