From 8c70f0baad484a62769ae8e63f8d277d64ca7937 Mon Sep 17 00:00:00 2001 From: Rain Date: Tue, 30 Sep 2025 22:37:44 +0000 Subject: [PATCH 1/3] [spr] initial version Created using spr 1.3.6-beta.1 --- Cargo.lock | 22 +- Cargo.toml | 3 +- clients/bootstrap-agent-client/src/lib.rs | 3 +- .../clickhouse-admin-keeper-client/src/lib.rs | 4 +- .../clickhouse-admin-server-client/src/lib.rs | 4 +- .../clickhouse-admin-single-client/src/lib.rs | 4 +- clients/cockroach-admin-client/src/lib.rs | 6 +- clients/gateway-client/src/lib.rs | 6 +- clients/installinator-client/src/lib.rs | 4 +- clients/nexus-client/src/lib.rs | 12 +- clients/nexus-lockstep-client/src/lib.rs | 7 +- clients/sled-agent-client/src/lib.rs | 8 +- clients/wicketd-client/src/lib.rs | 5 +- cockroach-admin/api/src/lib.rs | 1 + gateway-api/src/lib.rs | 1 + openapi/bootstrap-agent.json | 46 +- .../cockroach-admin-2.0.0-bb13be.json | 469 + .../cockroach-admin-latest.json | 2 +- openapi/gateway/gateway-3.0.0-dacda2.json | 4042 ++++++++ openapi/gateway/gateway-latest.json | 2 +- openapi/installinator.json | 9 +- openapi/nexus-internal.json | 255 +- openapi/nexus-lockstep.json | 194 +- .../sled-agent/sled-agent-5.0.0-253577.json | 8438 +++++++++++++++++ openapi/sled-agent/sled-agent-latest.json | 2 +- openapi/wicketd.json | 48 +- sled-agent/api/src/lib.rs | 1 + uuid-kinds/Cargo.toml | 1 + uuid-kinds/src/lib.rs | 146 +- workspace-hack/Cargo.toml | 4 +- 30 files changed, 13423 insertions(+), 326 deletions(-) create mode 100644 openapi/cockroach-admin/cockroach-admin-2.0.0-bb13be.json create mode 100644 openapi/gateway/gateway-3.0.0-dacda2.json create mode 100644 openapi/sled-agent/sled-agent-5.0.0-253577.json diff --git a/Cargo.lock b/Cargo.lock index b4c01795813..0a93caabea6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4712,7 +4712,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.0", "system-configuration", "tokio", "tower-service", @@ -6306,16 +6306,31 @@ dependencies = [ [[package]] name = "newtype-uuid" -version = "1.2.4" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17d82edb1c8a6c20c238747ae7aae9181133e766bc92cd2556fdd764407d0d1" +checksum = "74d1216f62e63be5fb25a9ecd1e2b37b1556a9b8c02f4831770f5d01df85c226" dependencies = [ "proptest", "schemars", "serde", + "serde_json", "uuid", ] +[[package]] +name = "newtype-uuid-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2e8f1451c201475b7c17007b26509ef981a04d6655edf1e52ed51da82968ae" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "serde", + "serde_tokenstream", + "syn 2.0.106", +] + [[package]] name = "newtype_derive" version = "0.1.6" @@ -8657,6 +8672,7 @@ version = "0.1.0" dependencies = [ "daft", "newtype-uuid", + "newtype-uuid-macros", "paste", "proptest", "schemars", diff --git a/Cargo.toml b/Cargo.toml index 149f365d019..159a7f064b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -791,7 +791,8 @@ zone = { version = "0.3.1", default-features = false, features = ["async"] } # the kinds). However, uses of omicron-uuid-kinds _within omicron_ will have # std and the other features enabled because they'll refer to it via # omicron-uuid-kinds.workspace = true. -newtype-uuid = { version = "1.2.4", default-features = false } +newtype-uuid = { version = "1.3.1", default-features = false } +newtype-uuid-macros = "0.1.0" omicron-uuid-kinds = { path = "uuid-kinds", features = ["serde", "schemars08", "uuid-v4"] } # NOTE: The test profile inherits from the dev profile, so settings under diff --git a/clients/bootstrap-agent-client/src/lib.rs b/clients/bootstrap-agent-client/src/lib.rs index 643dab87307..5a893bfc40c 100644 --- a/clients/bootstrap-agent-client/src/lib.rs +++ b/clients/bootstrap-agent-client/src/lib.rs @@ -20,13 +20,12 @@ progenitor::generate_api!( }), derives = [schemars::JsonSchema], crates = { + "omicron-uuid-kinds" = "*", "oxnet" = "0.1.0", }, replace = { AllowedSourceIps = omicron_common::api::external::AllowedSourceIps, ImportExportPolicy = omicron_common::api::external::ImportExportPolicy, - TypedUuidForRackInitKind = omicron_uuid_kinds::RackInitUuid, - TypedUuidForRackResetKind = omicron_uuid_kinds::RackResetUuid, }, ); diff --git a/clients/clickhouse-admin-keeper-client/src/lib.rs b/clients/clickhouse-admin-keeper-client/src/lib.rs index 68bcbbaa079..160b6f4558d 100644 --- a/clients/clickhouse-admin-keeper-client/src/lib.rs +++ b/clients/clickhouse-admin-keeper-client/src/lib.rs @@ -19,9 +19,11 @@ progenitor::generate_api!( post_hook = (|log: &slog::Logger, result: &Result<_, _>| { slog::debug!(log, "client response"; "result" => ?result); }), + crates = { + "omicron-uuid-kinds" = "*", + }, derives = [schemars::JsonSchema], replace = { - TypedUuidForOmicronZoneKind = omicron_uuid_kinds::OmicronZoneUuid, KeeperConfigurableSettings = clickhouse_admin_types::KeeperConfigurableSettings, ClickhouseKeeperClusterMembership = clickhouse_admin_types::ClickhouseKeeperClusterMembership, KeeperId = clickhouse_admin_types::KeeperId diff --git a/clients/clickhouse-admin-server-client/src/lib.rs b/clients/clickhouse-admin-server-client/src/lib.rs index e8da8d250f6..7df5f735a83 100644 --- a/clients/clickhouse-admin-server-client/src/lib.rs +++ b/clients/clickhouse-admin-server-client/src/lib.rs @@ -19,9 +19,11 @@ progenitor::generate_api!( post_hook = (|log: &slog::Logger, result: &Result<_, _>| { slog::debug!(log, "client response"; "result" => ?result); }), + crates = { + "omicron-uuid-kinds" = "*", + }, derives = [schemars::JsonSchema], replace = { - TypedUuidForOmicronZoneKind = omicron_uuid_kinds::OmicronZoneUuid, ServerConfigurableSettings = clickhouse_admin_types::ServerConfigurableSettings, } ); diff --git a/clients/clickhouse-admin-single-client/src/lib.rs b/clients/clickhouse-admin-single-client/src/lib.rs index 396c9d68b2b..93dc4b31c8b 100644 --- a/clients/clickhouse-admin-single-client/src/lib.rs +++ b/clients/clickhouse-admin-single-client/src/lib.rs @@ -19,9 +19,11 @@ progenitor::generate_api!( post_hook = (|log: &slog::Logger, result: &Result<_, _>| { slog::debug!(log, "client response"; "result" => ?result); }), + crates = { + "omicron-uuid-kinds" = "*", + }, derives = [schemars::JsonSchema], replace = { - TypedUuidForOmicronZoneKind = omicron_uuid_kinds::OmicronZoneUuid, ServerConfigurableSettings = clickhouse_admin_types::ServerConfigurableSettings, } ); diff --git a/clients/cockroach-admin-client/src/lib.rs b/clients/cockroach-admin-client/src/lib.rs index 02edf2e6248..b7450fd7a30 100644 --- a/clients/cockroach-admin-client/src/lib.rs +++ b/clients/cockroach-admin-client/src/lib.rs @@ -18,8 +18,8 @@ progenitor::generate_api!( post_hook = (|log: &slog::Logger, result: &Result<_, _>| { slog::debug!(log, "client response"; "result" => ?result); }), + crates = { + "omicron-uuid-kinds" = "*", + }, derives = [schemars::JsonSchema], - replace = { - TypedUuidForOmicronZoneKind = omicron_uuid_kinds::OmicronZoneUuid, - } ); diff --git a/clients/gateway-client/src/lib.rs b/clients/gateway-client/src/lib.rs index ce09ce80751..da4d11bad9a 100644 --- a/clients/gateway-client/src/lib.rs +++ b/clients/gateway-client/src/lib.rs @@ -78,6 +78,10 @@ progenitor::generate_api!( SpUpdateStatus = { derives = [PartialEq, Hash, Eq] }, UpdatePreparationProgress = { derives = [PartialEq, Hash, Eq] }, }, + crates = { + "omicron-uuid-kinds" = "*", + }, + replace = { RotSlot = gateway_types::rot::RotSlot, Ena = ereport_types::Ena, @@ -85,8 +89,6 @@ progenitor::generate_api!( Ereports = ereport_types::Ereports, SpType = gateway_types::component::SpType, TaskDump = gateway_types::task_dump::TaskDump, - TypedUuidForEreporterRestartKind = omicron_uuid_kinds::EreporterRestartUuid, - TypedUuidForMupdateKind = omicron_uuid_kinds::MupdateUuid, }, ); diff --git a/clients/installinator-client/src/lib.rs b/clients/installinator-client/src/lib.rs index 366677ae6fe..35a5e3a274e 100644 --- a/clients/installinator-client/src/lib.rs +++ b/clients/installinator-client/src/lib.rs @@ -19,6 +19,9 @@ progenitor::generate_api!( slog::debug!(log, "client response"; "result" => ?result); }), derives = [schemars::JsonSchema], + crates = { + "omicron-uuid-kinds" = "*", + }, replace = { Duration = std::time::Duration, EventReportForInstallinatorSpec = installinator_common::EventReport, @@ -27,7 +30,6 @@ progenitor::generate_api!( ProgressEventForInstallinatorSpec = installinator_common::ProgressEvent, StepEventForGenericSpec = installinator_common::StepEvent, StepEventForInstallinatorSpec = installinator_common::StepEvent, - TypedUuidForMupdateKind = omicron_uuid_kinds::MupdateUuid, } ); diff --git a/clients/nexus-client/src/lib.rs b/clients/nexus-client/src/lib.rs index 9d596230ac5..bf9fec6c719 100644 --- a/clients/nexus-client/src/lib.rs +++ b/clients/nexus-client/src/lib.rs @@ -24,6 +24,7 @@ progenitor::generate_api!( }), crates = { "iddqd" = "*", + "omicron-uuid-kinds" = "*", "oxnet" = "0.1.0", }, replace = { @@ -51,17 +52,6 @@ progenitor::generate_api!( PlannerConfig = nexus_types::deployment::PlannerConfig, RecoverySiloConfig = nexus_sled_agent_shared::recovery_silo::RecoverySiloConfig, Srv = nexus_types::internal_api::params::Srv, - TypedUuidForBlueprintKind = omicron_uuid_kinds::BlueprintUuid, - TypedUuidForDatasetKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForDownstairsKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForPhysicalDiskKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForPropolisKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForSledKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForUpstairsKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForUpstairsRepairKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForUpstairsSessionKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForVolumeKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForZpoolKind = omicron_uuid_kinds::TypedUuid, ZpoolName = omicron_common::zpool_name::ZpoolName, }, patch = { diff --git a/clients/nexus-lockstep-client/src/lib.rs b/clients/nexus-lockstep-client/src/lib.rs index eb965b796fe..3942cacdb3a 100644 --- a/clients/nexus-lockstep-client/src/lib.rs +++ b/clients/nexus-lockstep-client/src/lib.rs @@ -27,6 +27,7 @@ progenitor::generate_api!( }), crates = { "iddqd" = "*", + "omicron-uuid-kinds" = "*", "oxnet" = "0.1.0", }, replace = { @@ -54,12 +55,6 @@ progenitor::generate_api!( ReconfiguratorConfig = nexus_types::deployment::ReconfiguratorConfig, ReconfiguratorConfigParam = nexus_types::deployment::ReconfiguratorConfigParam, ReconfiguratorConfigView = nexus_types::deployment::ReconfiguratorConfigView, - TypedUuidForBlueprintKind = omicron_uuid_kinds::BlueprintUuid, - TypedUuidForDatasetKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForDemoSagaKind = omicron_uuid_kinds::DemoSagaUuid, - TypedUuidForPhysicalDiskKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForSledKind = omicron_uuid_kinds::TypedUuid, - TypedUuidForZpoolKind = omicron_uuid_kinds::TypedUuid, UpdateStatus = nexus_types::internal_api::views::UpdateStatus, ZoneStatus = nexus_types::internal_api::views::ZoneStatus, ZoneStatusVersion = nexus_types::internal_api::views::ZoneStatusVersion, diff --git a/clients/sled-agent-client/src/lib.rs b/clients/sled-agent-client/src/lib.rs index 1e9f56efba0..7825b1a5cbe 100644 --- a/clients/sled-agent-client/src/lib.rs +++ b/clients/sled-agent-client/src/lib.rs @@ -42,6 +42,7 @@ progenitor::generate_api!( VirtualNetworkInterfaceHost = { derives = [Eq, Hash] }, }, crates = { + "omicron-uuid-kinds" = "*", "oxnet" = "0.1.0", }, replace = { @@ -84,13 +85,6 @@ progenitor::generate_api!( SledRole = nexus_sled_agent_shared::inventory::SledRole, SourceNatConfig = omicron_common::api::internal::shared::SourceNatConfig, SwitchLocation = omicron_common::api::external::SwitchLocation, - TypedUuidForDatasetKind = omicron_uuid_kinds::DatasetUuid, - TypedUuidForInstanceKind = omicron_uuid_kinds::InstanceUuid, - TypedUuidForOmicronZoneKind = omicron_uuid_kinds::OmicronZoneUuid, - TypedUuidForPropolisKind = omicron_uuid_kinds::PropolisUuid, - TypedUuidForSledKind = omicron_uuid_kinds::SledUuid, - TypedUuidForSupportBundleKind = omicron_uuid_kinds::SupportBundleUuid, - TypedUuidForZpoolKind = omicron_uuid_kinds::ZpoolUuid, Vni = omicron_common::api::external::Vni, VpcFirewallIcmpFilter = omicron_common::api::external::VpcFirewallIcmpFilter, ZpoolKind = omicron_common::zpool_name::ZpoolKind, diff --git a/clients/wicketd-client/src/lib.rs b/clients/wicketd-client/src/lib.rs index acad4100b0a..8b57f882d95 100644 --- a/clients/wicketd-client/src/lib.rs +++ b/clients/wicketd-client/src/lib.rs @@ -31,6 +31,9 @@ progenitor::generate_api!( RotImageDetails = { derives = [PartialEq, Eq, PartialOrd, Ord]}, UplinkConfig = { derives = [PartialEq, Eq, PartialOrd, Ord] }, }, + crates = { + "omicron-uuid-kinds" = "*", + }, replace = { AbortUpdateOptions = wicket_common::rack_update::AbortUpdateOptions, AllowedSourceIps = omicron_common::api::internal::shared::AllowedSourceIps, @@ -84,8 +87,6 @@ progenitor::generate_api!( StepEventForInstallinatorSpec = installinator_common::StepEvent, StepEventForWicketdEngineSpec = wicket_common::update_events::StepEvent, SwitchLocation = omicron_common::api::internal::shared::SwitchLocation, - TypedUuidForRackInitKind = omicron_uuid_kinds::RackInitUuid, - TypedUuidForRackResetKind = omicron_uuid_kinds::RackResetUuid, UpdateSimulatedResult = wicket_common::rack_update::UpdateSimulatedResult, UpdateTestError = wicket_common::rack_update::UpdateTestError, UplinkPreflightStepId = wicket_common::preflight_check::UplinkPreflightStepId, diff --git a/cockroach-admin/api/src/lib.rs b/cockroach-admin/api/src/lib.rs index 8401e9e7730..2d399a894ad 100644 --- a/cockroach-admin/api/src/lib.rs +++ b/cockroach-admin/api/src/lib.rs @@ -24,6 +24,7 @@ api_versions!([ // | example for the next person. // v // (next_int, IDENT), + (2, NEWTYPE_UUID_BUMP), (1, INITIAL), ]); diff --git a/gateway-api/src/lib.rs b/gateway-api/src/lib.rs index 2ebab843681..fe014f20259 100644 --- a/gateway-api/src/lib.rs +++ b/gateway-api/src/lib.rs @@ -44,6 +44,7 @@ api_versions!([ // | example for the next person. // v // (next_int, IDENT), + (3, NEWTYPE_UUID_BUMP), (2, COSMO), (1, INITIAL), ]); diff --git a/openapi/bootstrap-agent.json b/openapi/bootstrap-agent.json index ce16f185800..746d94553b4 100644 --- a/openapi/bootstrap-agent.json +++ b/openapi/bootstrap-agent.json @@ -105,7 +105,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" } } } @@ -127,7 +127,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" } } } @@ -921,6 +921,15 @@ "speed400_g" ] }, + "RackInitUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::RackInitUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "RackInitializeRequest": { "description": "Configuration for the \"rack setup service\".\n\nThe Rack Setup Service should be responsible for one-time setup actions, such as CockroachDB placement and initialization. Without operator intervention, however, these actions need a way to be automated in our deployment.", "type": "object", @@ -1077,7 +1086,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" }, "status": { "type": "string", @@ -1103,7 +1112,7 @@ "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" } ] }, @@ -1122,7 +1131,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" }, "message": { "type": "string" @@ -1144,7 +1153,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" }, "status": { "type": "string", @@ -1162,7 +1171,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" }, "status": { "type": "string", @@ -1184,7 +1193,7 @@ "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" } ] }, @@ -1203,7 +1212,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" }, "message": { "type": "string" @@ -1225,7 +1234,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" }, "status": { "type": "string", @@ -1241,6 +1250,15 @@ } ] }, + "RackResetUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::RackResetUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "RecoverySiloConfig": { "type": "object", "properties": { @@ -1568,14 +1586,6 @@ } } }, - "TypedUuidForRackInitKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForRackResetKind": { - "type": "string", - "format": "uuid" - }, "UplinkAddressConfig": { "type": "object", "properties": { diff --git a/openapi/cockroach-admin/cockroach-admin-2.0.0-bb13be.json b/openapi/cockroach-admin/cockroach-admin-2.0.0-bb13be.json new file mode 100644 index 00000000000..569d6f84f55 --- /dev/null +++ b/openapi/cockroach-admin/cockroach-admin-2.0.0-bb13be.json @@ -0,0 +1,469 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "CockroachDB Cluster Admin API", + "description": "API for interacting with the Oxide control plane's CockroachDB cluster", + "contact": { + "url": "https://oxide.computer", + "email": "api@oxide.computer" + }, + "version": "2.0.0" + }, + "paths": { + "/cluster/init": { + "post": { + "summary": "Initialize the CockroachDB cluster.", + "description": "This performs both the base-level `cockroach init` and installs the Omicron schema. It should be idempotent, but we haven't heavily tested that. We test that this endpoint can safely be called multiple times, but haven't tested calling it concurrently (either multiple simultaneous requests to the same cockroach node, or sending simultaneous requests to different cockroach nodes, both of which would rely on `cockroach init` itself being safe to call concurrently). In practice, only RSS calls this endpoint and it does so serially; as long as we don't change that, the existing testing should be sufficient.", + "operationId": "cluster_init", + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/node/decommission": { + "post": { + "summary": "Decommission a node from the CRDB cluster.", + "operationId": "node_decommission", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeId" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeDecommission" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/node/id": { + "get": { + "summary": "Get the CockroachDB node ID of the local cockroach instance.", + "operationId": "local_node_id", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocalNodeId" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/node/status": { + "get": { + "summary": "Get the status of all nodes in the CRDB cluster.", + "operationId": "node_status", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterNodeStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/proxy/status/nodes": { + "get": { + "summary": "Proxy to CockroachDB's /_status/nodes endpoint", + "operationId": "status_nodes", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "String", + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/proxy/status/vars": { + "get": { + "summary": "Proxy to CockroachDB's /_status/vars endpoint", + "operationId": "status_vars", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "String", + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + } + }, + "components": { + "schemas": { + "ClusterNodeStatus": { + "type": "object", + "properties": { + "all_nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeStatus" + } + } + }, + "required": [ + "all_nodes" + ] + }, + "Error": { + "description": "Error information from a response.", + "type": "object", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "message", + "request_id" + ] + }, + "LocalNodeId": { + "description": "CockroachDB Node ID", + "type": "object", + "properties": { + "node_id": { + "type": "string" + }, + "zone_id": { + "description": "The ID of this Omicron zone.\n\nThis is included to ensure correctness even if a socket address on a sled is reused for a different zone; if our caller is trying to determine the node ID for a particular Omicron CockroachDB zone, they'll contact us by socket address. We include our zone ID in the response for their confirmation that we are the zone they intended to contact.", + "allOf": [ + { + "$ref": "#/components/schemas/OmicronZoneUuid" + } + ] + } + }, + "required": [ + "node_id", + "zone_id" + ] + }, + "NodeDecommission": { + "type": "object", + "properties": { + "is_decommissioning": { + "type": "boolean" + }, + "is_draining": { + "type": "boolean" + }, + "is_live": { + "type": "boolean" + }, + "membership": { + "$ref": "#/components/schemas/NodeMembership" + }, + "node_id": { + "type": "string" + }, + "notes": { + "type": "array", + "items": { + "type": "string" + } + }, + "replicas": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "is_decommissioning", + "is_draining", + "is_live", + "membership", + "node_id", + "notes", + "replicas" + ] + }, + "NodeId": { + "type": "object", + "properties": { + "node_id": { + "type": "string" + } + }, + "required": [ + "node_id" + ] + }, + "NodeMembership": { + "oneOf": [ + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "active" + ] + } + }, + "required": [ + "state" + ] + }, + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "decommissioning" + ] + } + }, + "required": [ + "state" + ] + }, + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "decommissioned" + ] + } + }, + "required": [ + "state" + ] + }, + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "unknown" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "state", + "value" + ] + } + ] + }, + "NodeStatus": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "build": { + "type": "string" + }, + "gossiped_replicas": { + "type": "integer", + "format": "int64" + }, + "intent_bytes": { + "type": "integer", + "format": "int64" + }, + "is_available": { + "type": "boolean" + }, + "is_decommissioning": { + "type": "boolean" + }, + "is_draining": { + "type": "boolean" + }, + "is_live": { + "type": "boolean" + }, + "key_bytes": { + "type": "integer", + "format": "int64" + }, + "live_bytes": { + "type": "integer", + "format": "int64" + }, + "locality": { + "type": "string" + }, + "membership": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "ranges": { + "type": "integer", + "format": "int64" + }, + "ranges_unavailable": { + "type": "integer", + "format": "int64" + }, + "ranges_underreplicated": { + "type": "integer", + "format": "int64" + }, + "replicas_leaders": { + "type": "integer", + "format": "int64" + }, + "replicas_leaseholders": { + "type": "integer", + "format": "int64" + }, + "sql_address": { + "type": "string" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "system_bytes": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "value_bytes": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "address", + "build", + "gossiped_replicas", + "intent_bytes", + "is_available", + "is_decommissioning", + "is_draining", + "is_live", + "key_bytes", + "live_bytes", + "locality", + "membership", + "node_id", + "ranges", + "ranges_unavailable", + "ranges_underreplicated", + "replicas_leaders", + "replicas_leaseholders", + "sql_address", + "started_at", + "system_bytes", + "updated_at", + "value_bytes" + ] + }, + "OmicronZoneUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::OmicronZoneUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + } + }, + "responses": { + "Error": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } +} diff --git a/openapi/cockroach-admin/cockroach-admin-latest.json b/openapi/cockroach-admin/cockroach-admin-latest.json index 4a81b27dac9..a4bc7c9ec9a 120000 --- a/openapi/cockroach-admin/cockroach-admin-latest.json +++ b/openapi/cockroach-admin/cockroach-admin-latest.json @@ -1 +1 @@ -cockroach-admin-1.0.0-dc9acb.json \ No newline at end of file +cockroach-admin-2.0.0-bb13be.json \ No newline at end of file diff --git a/openapi/gateway/gateway-3.0.0-dacda2.json b/openapi/gateway/gateway-3.0.0-dacda2.json new file mode 100644 index 00000000000..7ac0310a3cc --- /dev/null +++ b/openapi/gateway/gateway-3.0.0-dacda2.json @@ -0,0 +1,4042 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Oxide Management Gateway Service API", + "description": "API for interacting with the Oxide control plane's gateway service", + "contact": { + "url": "https://oxide.computer", + "email": "api@oxide.computer" + }, + "version": "3.0.0" + }, + "paths": { + "/ignition": { + "get": { + "summary": "List SPs via Ignition", + "description": "Retreive information for all SPs via the Ignition controller. This is lower latency and has fewer possible failure modes than querying the SP over the management network.", + "operationId": "ignition_list", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SpIgnitionInfo", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpIgnitionInfo" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/ignition/{type}/{slot}": { + "get": { + "summary": "Get SP info via Ignition", + "description": "Retreive information for an SP via the Ignition controller. This is lower latency and has fewer possible failure modes than querying the SP over the management network.", + "operationId": "ignition_get", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpIgnitionInfo" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/ignition/{type}/{slot}/{command}": { + "post": { + "summary": "Send an ignition command targeting a specific SP.", + "description": "This endpoint can be used to transition a target between A2 and A3 (via power-on / power-off) or reset it.\n\nThe management network traffic caused by requests to this endpoint is between this MGS instance and its local ignition controller, _not_ the SP targeted by the command.", + "operationId": "ignition_command", + "parameters": [ + { + "in": "path", + "name": "command", + "description": "Ignition command to perform on the targeted SP.", + "required": true, + "schema": { + "$ref": "#/components/schemas/IgnitionCommand" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/local/all-sp-ids": { + "get": { + "summary": "Get the complete list of SP identifiers this MGS instance is configured to", + "description": "find and communicate with.\n\nNote that unlike most MGS endpoints, this endpoint does not send any communication on the management network.", + "operationId": "sp_all_ids", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SpIdentifier", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpIdentifier" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/local/switch-id": { + "get": { + "summary": "Get the identifier for the switch this MGS instance is connected to.", + "description": "Note that most MGS endpoints behave identically regardless of which scrimlet the MGS instance is running on; this one, however, is intentionally different. This endpoint is _probably_ only useful for clients communicating with MGS over localhost (i.e., other services in the switch zone) who need to know which sidecar they are connected to.", + "operationId": "sp_local_switch_id", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpIdentifier" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/recovery/host-phase2": { + "post": { + "summary": "Upload a host phase2 image that can be served to recovering hosts via the", + "description": "host/SP control uart.\n\nMGS caches this image in memory and is limited to a small, fixed number of images (potentially 1). Uploading a new image may evict the least-recently-requested image if our cache is already full.", + "operationId": "recovery_host_phase2_upload", + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostPhase2RecoveryImageId" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}": { + "get": { + "summary": "Get info on an SP", + "operationId": "sp_get", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpState" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component": { + "get": { + "summary": "List components of an SP", + "description": "A component is a distinct entity under an SP's direct control. This lists all those components for a given SP.", + "operationId": "sp_component_list", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpComponentList" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}": { + "get": { + "summary": "Get info for an SP component", + "description": "This can be useful, for example, to poll the state of a component if another interface has changed the power state of a component or updated a component.", + "operationId": "sp_component_get", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SpComponentDetails", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpComponentDetails" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/active-slot": { + "get": { + "summary": "Get the currently-active slot for an SP component", + "description": "Note that the meaning of \"current\" in \"currently-active\" may vary depending on the component: for example, it may mean \"the actively-running slot\" or \"the slot that will become active the next time the component is booted\".", + "operationId": "sp_component_active_slot_get", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpComponentFirmwareSlot" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "summary": "Set the currently-active slot for an SP component", + "description": "Note that the meaning of \"current\" in \"currently-active\" may vary depending on the component: for example, it may mean \"the actively-running slot\" or \"the slot that will become active the next time the component is booted\".", + "operationId": "sp_component_active_slot_set", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + }, + { + "in": "query", + "name": "persist", + "description": "Persist this choice of active slot.", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpComponentFirmwareSlot" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/caboose": { + "get": { + "summary": "Get the caboose of an SP component", + "description": "Not all components have a caboose.", + "operationId": "sp_component_caboose_get", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + }, + { + "in": "query", + "name": "firmware_slot", + "description": "The firmware slot to for which we want to request caboose information.", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpComponentCaboose" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/cfpa": { + "get": { + "summary": "Read the requested CFPA slot from a root of trust.", + "description": "This endpoint is only valid for the `rot` component.", + "operationId": "sp_rot_cfpa_get", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCfpaParams" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RotCfpa" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/clear-status": { + "post": { + "summary": "Clear status of a component", + "description": "For components that maintain event counters (e.g., the sidecar `monorail`), this will reset the event counters to zero.", + "operationId": "sp_component_clear_status", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/cmpa": { + "get": { + "summary": "Read the CMPA from a root of trust.", + "description": "This endpoint is only valid for the `rot` component.", + "operationId": "sp_rot_cmpa_get", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RotCmpa" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/hash/{firmware_slot}": { + "get": { + "summary": "Get a computed hash of a given slot of a component.", + "description": "This endpoint is only valid for the `host-boot-flash` component.\n\nComputing the hash takes several seconds; this endpoint returns the current status. If the status is `HashNotStarted`, callers should start hashing using `sp_component_hash_firmware_start()`. If the status is `HashInProgress`, callers should wait a bit then call this endpoint again.", + "operationId": "sp_component_hash_firmware_get", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "firmware_slot", + "description": "Firmware slot of the component.", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ComponentFirmwareHashStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "summary": "Start computing the hash of a given slot of a component.", + "description": "This endpoint is only valid for the `host-boot-flash` component.\n\nComputing the hash takes several seconds; callers should poll for results using `sp_component_hash_firmware_get()`. In general they should call `sp_component_hash_firmware_get()` first anyway, as the hashes are cached in the SP and may already be ready.", + "operationId": "sp_component_hash_firmware_start", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "firmware_slot", + "description": "Firmware slot of the component.", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/reset": { + "post": { + "summary": "Reset an SP component (possibly the SP itself).", + "operationId": "sp_component_reset", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/SpComponentResetError" + }, + "5XX": { + "$ref": "#/components/responses/SpComponentResetError" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/rot-boot-info": { + "get": { + "summary": "Read the RoT boot state from a root of trust", + "description": "This endpoint is only valid for the `rot` component.", + "operationId": "sp_rot_boot_info", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRotBootInfoParams" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RotState" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/serial-console/attach": { + "get": { + "summary": "Upgrade into a websocket connection attached to the given SP", + "description": "component's serial console.", + "operationId": "sp_component_serial_console_attach", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + }, + "x-dropshot-websocket": {} + } + }, + "/sp/{type}/{slot}/component/{component}/serial-console/detach": { + "post": { + "summary": "Detach the websocket connection attached to the given SP component's", + "description": "serial console, if such a connection exists.", + "operationId": "sp_component_serial_console_detach", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/update": { + "post": { + "summary": "Update an SP component", + "description": "Update a component of an SP according to its specific update mechanism. This interface is generic for all component types, but resolves to a mechanism specific to the given component type. This may fail for a variety of reasons including the update bundle being invalid or improperly specified or due to an error originating from the SP itself.\n\nNote that not all components may be updated; components without known update mechanisms will return an error without any inspection of the update bundle.\n\nUpdating the SP itself is done via the component name `sp`.", + "operationId": "sp_component_update", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + }, + { + "in": "query", + "name": "firmware_slot", + "description": "The update slot to apply this image to. Supply 0 if the component only has one update slot.", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "query", + "name": "id", + "description": "An identifier for this update.\n\nThis ID applies to this single instance of the API call; it is not an ID of `image` itself. Multiple API calls with the same `image` should use different IDs.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/update-abort": { + "post": { + "summary": "Abort any in-progress update an SP component", + "description": "Aborting an update to the SP itself is done via the component name `sp`.\n\nOn a successful return, the update corresponding to the given UUID will no longer be in progress (either aborted or applied).", + "operationId": "sp_component_update_abort", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAbortBody" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/component/{component}/update-status": { + "get": { + "summary": "Get the status of an update being applied to an SP component", + "description": "Getting the status of an update to the SP itself is done via the component name `sp`.", + "operationId": "sp_component_update_status", + "parameters": [ + { + "in": "path", + "name": "component", + "description": "ID for the component of the SP; this is the internal identifier used by the SP itself to identify its components.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpUpdateStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/ereports": { + "post": { + "summary": "Request ereports from the target service processor.", + "description": "Query parameters provide the ENAs of the initial ereport in the returned tranche, the SP's restart ID that the control plane believes is current, and the (optional) last committed ENA.", + "operationId": "sp_ereports_ingest", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + }, + { + "in": "query", + "name": "committed", + "description": "The ENA of the last ereport committed to persistent storage from the requested reporter restart generation.\n\nIf the restart ID parameter matches the reporter's current restart ID, it is permitted to discard any ereports with ENAs up to and including this value. If the restart ID has changed from the provided one, the reporter will not discard data.", + "schema": { + "$ref": "#/components/schemas/Ena" + } + }, + { + "in": "query", + "name": "limit", + "description": "Maximum number of ereports to return in this tranche.", + "required": true, + "schema": { + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "restart_id", + "description": "The restart ID of the reporter at which all other query parameters are valid.\n\nIf this value does not match the reporter's restart ID, the reporter's response will include the current generation, and will start at the earliest known ENA, rather than the provided `start_at` ENA.", + "required": true, + "schema": { + "$ref": "#/components/schemas/EreporterRestartUuid" + } + }, + { + "in": "query", + "name": "start_at", + "description": "If present, the reporter should not include ENAs earlier than this one in its response, provided that the query's requested restart ID matches the current restart ID.", + "schema": { + "$ref": "#/components/schemas/Ena" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ereports" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/host-phase2-progress": { + "get": { + "summary": "Get the most recent host phase2 request we've seen from the target SP.", + "description": "This method can be used as an indirect progress report for how far along a host is when it is booting via the MGS -> SP -> UART recovery path. This path is used to install the trampoline image containing installinator to recover a sled.", + "operationId": "sp_host_phase2_progress_get", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostPhase2Progress" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "summary": "Clear the most recent host phase2 request we've seen from the target SP.", + "operationId": "sp_host_phase2_progress_delete", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/ipcc/installinator-image-id": { + "put": { + "summary": "Set the installinator image ID the sled should use for recovery.", + "description": "This value can be read by the host via IPCC; see the `ipcc` crate.", + "operationId": "sp_installinator_image_id_set", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstallinatorImageId" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "summary": "Clear any previously-set installinator image ID on the target sled.", + "operationId": "sp_installinator_image_id_delete", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/power-state": { + "get": { + "summary": "Get the current power state of a sled via its SP.", + "description": "Note that if the sled is in A3, the SP is powered off and will not be able to respond; use the ignition control endpoints for those cases.", + "operationId": "sp_power_state_get", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PowerState" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "summary": "Set the current power state of a sled via its SP.", + "description": "Note that if the sled is in A3, the SP is powered off and will not be able to respond; use the ignition control endpoints for those cases.", + "operationId": "sp_power_state_set", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PowerState" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/sensor/{sensor_id}/value": { + "get": { + "summary": "Read the current value of a sensor by ID", + "description": "Sensor IDs come from the host topo tree.", + "operationId": "sp_sensor_read_value", + "parameters": [ + { + "in": "path", + "name": "sensor_id", + "description": "ID for the sensor on the SP.", + "required": true, + "schema": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpSensorReading" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/startup-options": { + "get": { + "summary": "Get host startup options for a sled", + "description": "This endpoint will currently fail for any `SpType` other than `SpType::Sled`.", + "operationId": "sp_startup_options_get", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostStartupOptions" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "summary": "Set host startup options for a sled", + "description": "This endpoint will currently fail for any `SpType` other than `SpType::Sled`.", + "operationId": "sp_startup_options_set", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostStartupOptions" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/task-dump": { + "get": { + "summary": "Get the number of task dumps present on an SP", + "operationId": "sp_task_dump_count", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "uint32", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sp/{type}/{slot}/task-dump/{task_dump_index}": { + "get": { + "summary": "Read a single task dump from an SP", + "operationId": "sp_task_dump_get", + "parameters": [ + { + "in": "path", + "name": "slot", + "required": true, + "schema": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + { + "in": "path", + "name": "task_dump_index", + "description": "The index of the task dump to be read.", + "required": true, + "schema": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/SpType" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskDump" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + } + }, + "components": { + "schemas": { + "ComponentFirmwareHashStatus": { + "oneOf": [ + { + "description": "The hash is not available; the client must issue a separate request to begin calculating the hash.", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "hash_not_calculated" + ] + } + }, + "required": [ + "status" + ] + }, + { + "description": "The hash is currently being calculated; the client should sleep briefly then check again.\n\nWe expect this operation to take a handful of seconds in practice.", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "hash_in_progress" + ] + } + }, + "required": [ + "status" + ] + }, + { + "description": "The hash of the given firmware slot.", + "type": "object", + "properties": { + "sha256": { + "type": "array", + "items": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "minItems": 32, + "maxItems": 32 + }, + "status": { + "type": "string", + "enum": [ + "hashed" + ] + } + }, + "required": [ + "sha256", + "status" + ] + } + ] + }, + "Duration": { + "type": "object", + "properties": { + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "nanos", + "secs" + ] + }, + "Ena": { + "description": "An Error Numeric Association (ENA)", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "Ereport": { + "description": "An ereport message.", + "type": "object", + "properties": { + "ena": { + "description": "The ENA of the ereport.", + "allOf": [ + { + "$ref": "#/components/schemas/Ena" + } + ] + } + }, + "required": [ + "ena" + ], + "additionalProperties": true + }, + "EreporterRestartUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::EreporterRestartUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "Ereports": { + "description": "A tranche of ereports received from a reporter.", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/Ereport" + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + }, + "restart_id": { + "description": "The reporter's current restart ID.\n\nIf this is not equal to the current known restart ID, then the reporter has restarted.", + "allOf": [ + { + "$ref": "#/components/schemas/EreporterRestartUuid" + } + ] + } + }, + "required": [ + "items", + "restart_id" + ] + }, + "Error": { + "description": "Error information from a response.", + "type": "object", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "message", + "request_id" + ] + }, + "GetCfpaParams": { + "type": "object", + "properties": { + "slot": { + "$ref": "#/components/schemas/RotCfpaSlot" + } + }, + "required": [ + "slot" + ] + }, + "GetRotBootInfoParams": { + "type": "object", + "properties": { + "version": { + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "required": [ + "version" + ] + }, + "HostPhase2Progress": { + "oneOf": [ + { + "type": "object", + "properties": { + "age": { + "$ref": "#/components/schemas/Duration" + }, + "image_id": { + "$ref": "#/components/schemas/HostPhase2RecoveryImageId" + }, + "offset": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "progress": { + "type": "string", + "enum": [ + "available" + ] + }, + "total_size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "age", + "image_id", + "offset", + "progress", + "total_size" + ] + }, + { + "type": "object", + "properties": { + "progress": { + "type": "string", + "enum": [ + "none" + ] + } + }, + "required": [ + "progress" + ] + } + ] + }, + "HostPhase2RecoveryImageId": { + "description": "Identity of a host phase2 recovery image.", + "type": "object", + "properties": { + "sha256_hash": { + "type": "string", + "format": "hex string (32 bytes)" + } + }, + "required": [ + "sha256_hash" + ] + }, + "HostStartupOptions": { + "type": "object", + "properties": { + "boot_net": { + "type": "boolean" + }, + "boot_ramdisk": { + "type": "boolean" + }, + "bootrd": { + "type": "boolean" + }, + "kbm": { + "type": "boolean" + }, + "kmdb": { + "type": "boolean" + }, + "kmdb_boot": { + "type": "boolean" + }, + "phase2_recovery_mode": { + "type": "boolean" + }, + "prom": { + "type": "boolean" + }, + "verbose": { + "type": "boolean" + } + }, + "required": [ + "boot_net", + "boot_ramdisk", + "bootrd", + "kbm", + "kmdb", + "kmdb_boot", + "phase2_recovery_mode", + "prom", + "verbose" + ] + }, + "InstallinatorImageId": { + "type": "object", + "properties": { + "control_plane": { + "type": "string", + "format": "hex string (32 bytes)" + }, + "host_phase_2": { + "type": "string", + "format": "hex string (32 bytes)" + }, + "update_id": { + "$ref": "#/components/schemas/MupdateUuid" + } + }, + "required": [ + "control_plane", + "host_phase_2", + "update_id" + ] + }, + "LinkStatus": { + "oneOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "error" + ] + } + }, + "required": [ + "status" + ] + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "down" + ] + } + }, + "required": [ + "status" + ] + }, + { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "up" + ] + } + }, + "required": [ + "status" + ] + } + ] + }, + "MeasurementErrorCode": { + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "invalid_sensor" + ] + } + }, + "required": [ + "code" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "no_reading" + ] + } + }, + "required": [ + "code" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "not_present" + ] + } + }, + "required": [ + "code" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "device_error" + ] + } + }, + "required": [ + "code" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "device_unavailable" + ] + } + }, + "required": [ + "code" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "device_timeout" + ] + } + }, + "required": [ + "code" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "device_off" + ] + } + }, + "required": [ + "code" + ] + } + ] + }, + "MeasurementKind": { + "oneOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "temperature" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "power" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "current" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "voltage" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "input_current" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "input_voltage" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "speed" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "cpu_tctl" + ] + } + }, + "required": [ + "kind" + ] + } + ] + }, + "MupdateUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::MupdateUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "PacketCount": { + "type": "object", + "properties": { + "broadcast": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "multicast": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "unicast": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "broadcast", + "multicast", + "unicast" + ] + }, + "PhyStatus": { + "type": "object", + "properties": { + "mac_link_up": { + "$ref": "#/components/schemas/LinkStatus" + }, + "media_link_up": { + "$ref": "#/components/schemas/LinkStatus" + }, + "ty": { + "$ref": "#/components/schemas/PhyType" + } + }, + "required": [ + "mac_link_up", + "media_link_up", + "ty" + ] + }, + "PhyType": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "vsc8504" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "vsc8522" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "vsc8552" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "vsc8562" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "PortConfig": { + "type": "object", + "properties": { + "dev_num": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "dev_type": { + "$ref": "#/components/schemas/PortDev" + }, + "mode": { + "$ref": "#/components/schemas/PortMode" + }, + "serdes_num": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "serdes_type": { + "$ref": "#/components/schemas/PortSerdes" + } + }, + "required": [ + "dev_num", + "dev_type", + "mode", + "serdes_num", + "serdes_type" + ] + }, + "PortCounters": { + "type": "object", + "properties": { + "link_down_sticky": { + "type": "boolean" + }, + "phy_link_down_sticky": { + "type": "boolean" + }, + "rx": { + "$ref": "#/components/schemas/PacketCount" + }, + "tx": { + "$ref": "#/components/schemas/PacketCount" + } + }, + "required": [ + "link_down_sticky", + "phy_link_down_sticky", + "rx", + "tx" + ] + }, + "PortDev": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dev1g" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dev2g5" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dev10g" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "PortMode": { + "oneOf": [ + { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "sfi" + ] + } + }, + "required": [ + "mode" + ] + }, + { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "base_kr" + ] + } + }, + "required": [ + "mode" + ] + }, + { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "sgmii" + ] + }, + "speed": { + "$ref": "#/components/schemas/Speed" + } + }, + "required": [ + "mode", + "speed" + ] + }, + { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "qsgmii" + ] + }, + "speed": { + "$ref": "#/components/schemas/Speed" + } + }, + "required": [ + "mode", + "speed" + ] + } + ] + }, + "PortSerdes": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "serdes1g" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "serdes6g" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "serdes10g" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "PortStatusErrorCode": { + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "unconfigured" + ] + } + }, + "required": [ + "code" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "other" + ] + }, + "raw": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "code", + "raw" + ] + } + ] + }, + "PowerState": { + "description": "See RFD 81.\n\nThis enum only lists power states the SP is able to control; higher power states are controlled by ignition.", + "type": "string", + "enum": [ + "A0", + "A1", + "A2" + ] + }, + "RotCfpa": { + "type": "object", + "properties": { + "base64_data": { + "type": "string" + }, + "slot": { + "$ref": "#/components/schemas/RotCfpaSlot" + } + }, + "required": [ + "base64_data", + "slot" + ] + }, + "RotCfpaSlot": { + "oneOf": [ + { + "type": "object", + "properties": { + "slot": { + "type": "string", + "enum": [ + "active" + ] + } + }, + "required": [ + "slot" + ] + }, + { + "type": "object", + "properties": { + "slot": { + "type": "string", + "enum": [ + "inactive" + ] + } + }, + "required": [ + "slot" + ] + }, + { + "type": "object", + "properties": { + "slot": { + "type": "string", + "enum": [ + "scratch" + ] + } + }, + "required": [ + "slot" + ] + } + ] + }, + "RotCmpa": { + "type": "object", + "properties": { + "base64_data": { + "type": "string" + } + }, + "required": [ + "base64_data" + ] + }, + "RotImageError": { + "type": "string", + "enum": [ + "unchecked", + "first_page_erased", + "partially_programmed", + "invalid_length", + "header_not_programmed", + "bootloader_too_small", + "bad_magic", + "header_image_size", + "unaligned_length", + "unsupported_type", + "reset_vector_not_thumb2", + "reset_vector", + "signature" + ] + }, + "RotSlot": { + "oneOf": [ + { + "type": "object", + "properties": { + "slot": { + "type": "string", + "enum": [ + "a" + ] + } + }, + "required": [ + "slot" + ] + }, + { + "type": "object", + "properties": { + "slot": { + "type": "string", + "enum": [ + "b" + ] + } + }, + "required": [ + "slot" + ] + } + ] + }, + "RotState": { + "oneOf": [ + { + "type": "object", + "properties": { + "active": { + "$ref": "#/components/schemas/RotSlot" + }, + "pending_persistent_boot_preference": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotSlot" + } + ] + }, + "persistent_boot_preference": { + "$ref": "#/components/schemas/RotSlot" + }, + "slot_a_sha3_256_digest": { + "nullable": true, + "type": "string" + }, + "slot_b_sha3_256_digest": { + "nullable": true, + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "v2" + ] + }, + "transient_boot_preference": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotSlot" + } + ] + } + }, + "required": [ + "active", + "persistent_boot_preference", + "state" + ] + }, + { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "communication_failed" + ] + } + }, + "required": [ + "message", + "state" + ] + }, + { + "type": "object", + "properties": { + "active": { + "$ref": "#/components/schemas/RotSlot" + }, + "pending_persistent_boot_preference": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotSlot" + } + ] + }, + "persistent_boot_preference": { + "$ref": "#/components/schemas/RotSlot" + }, + "slot_a_error": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotImageError" + } + ] + }, + "slot_a_fwid": { + "type": "string" + }, + "slot_b_error": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotImageError" + } + ] + }, + "slot_b_fwid": { + "type": "string" + }, + "stage0_error": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotImageError" + } + ] + }, + "stage0_fwid": { + "type": "string" + }, + "stage0next_error": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotImageError" + } + ] + }, + "stage0next_fwid": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "v3" + ] + }, + "transient_boot_preference": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RotSlot" + } + ] + } + }, + "required": [ + "active", + "persistent_boot_preference", + "slot_a_fwid", + "slot_b_fwid", + "stage0_fwid", + "stage0next_fwid", + "state" + ] + } + ] + }, + "SpComponentCaboose": { + "type": "object", + "properties": { + "board": { + "type": "string" + }, + "epoch": { + "nullable": true, + "type": "string" + }, + "git_commit": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sign": { + "nullable": true, + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "board", + "git_commit", + "name", + "version" + ] + }, + "SpComponentDetails": { + "oneOf": [ + { + "type": "object", + "properties": { + "cfg": { + "$ref": "#/components/schemas/PortConfig" + }, + "counters": { + "$ref": "#/components/schemas/PortCounters" + }, + "link_status": { + "$ref": "#/components/schemas/LinkStatus" + }, + "phy_status": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/PhyStatus" + } + ] + }, + "port": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "type": { + "type": "string", + "enum": [ + "port_status" + ] + } + }, + "required": [ + "cfg", + "counters", + "link_status", + "port", + "type" + ] + }, + { + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/PortStatusErrorCode" + }, + "port": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "type": { + "type": "string", + "enum": [ + "port_status_error" + ] + } + }, + "required": [ + "code", + "port", + "type" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/MeasurementKind" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "measurement" + ] + }, + "value": { + "type": "number", + "format": "float" + } + }, + "required": [ + "kind", + "name", + "type", + "value" + ] + }, + { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/MeasurementErrorCode" + }, + "kind": { + "$ref": "#/components/schemas/MeasurementKind" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "measurement_error" + ] + } + }, + "required": [ + "error", + "kind", + "name", + "type" + ] + } + ] + }, + "SpComponentFirmwareSlot": { + "description": "Identifier for an SP's component's firmware slot; e.g., slots 0 and 1 for the host boot flash.", + "type": "object", + "properties": { + "slot": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "slot" + ] + }, + "SpComponentInfo": { + "description": "Overview of a single SP component.", + "type": "object", + "properties": { + "capabilities": { + "description": "`capabilities` is a bitmask; interpret it via [`gateway_messages::DeviceCapabilities`].", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "component": { + "description": "The unique identifier for this component.", + "type": "string" + }, + "description": { + "description": "A human-readable description of the component.", + "type": "string" + }, + "device": { + "description": "The name of the physical device.", + "type": "string" + }, + "presence": { + "description": "Whether or not the component is present, to the best of the SP's ability to judge.", + "allOf": [ + { + "$ref": "#/components/schemas/SpComponentPresence" + } + ] + }, + "serial_number": { + "nullable": true, + "description": "The component's serial number, if it has one.", + "type": "string" + } + }, + "required": [ + "capabilities", + "component", + "description", + "device", + "presence" + ] + }, + "SpComponentList": { + "description": "List of components from a single SP.", + "type": "object", + "properties": { + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpComponentInfo" + } + } + }, + "required": [ + "components" + ] + }, + "SpComponentPresence": { + "description": "Description of the presence or absence of a component.\n\nThe presence of some components may vary based on the power state of the sled (e.g., components that time out or appear unavailable if the sled is in A2 may become present when the sled moves to A0).", + "oneOf": [ + { + "description": "The component is present.", + "type": "string", + "enum": [ + "present" + ] + }, + { + "description": "The component is not present.", + "type": "string", + "enum": [ + "not_present" + ] + }, + { + "description": "The component is present but in a failed or faulty state.", + "type": "string", + "enum": [ + "failed" + ] + }, + { + "description": "The SP is unable to determine the presence of the component.", + "type": "string", + "enum": [ + "unavailable" + ] + }, + { + "description": "The SP's attempt to determine the presence of the component timed out.", + "type": "string", + "enum": [ + "timeout" + ] + }, + { + "description": "The SP's attempt to determine the presence of the component failed.", + "type": "string", + "enum": [ + "error" + ] + } + ] + }, + "SpComponentResetError": { + "description": "The error type returned by the `sp_component_reset()` MGS endpoint.", + "oneOf": [ + { + "description": "MGS refuses to reset its own sled's SP.", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "reset_sp_of_local_sled" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Other dropshot errors.", + "type": "object", + "properties": { + "error_code": { + "nullable": true, + "type": "string" + }, + "message": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "other" + ] + } + }, + "required": [ + "message", + "state" + ] + } + ] + }, + "SpIdentifier": { + "type": "object", + "properties": { + "slot": { + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "type": { + "$ref": "#/components/schemas/SpType" + } + }, + "required": [ + "slot", + "type" + ] + }, + "SpIgnition": { + "description": "State of an ignition target.", + "oneOf": [ + { + "type": "object", + "properties": { + "present": { + "type": "string", + "enum": [ + "no" + ] + } + }, + "required": [ + "present" + ] + }, + { + "type": "object", + "properties": { + "ctrl_detect_0": { + "type": "boolean" + }, + "ctrl_detect_1": { + "type": "boolean" + }, + "flt_a2": { + "description": "Fault from the A2 power domain", + "type": "boolean" + }, + "flt_a3": { + "description": "Fault from the A3 power domain", + "type": "boolean" + }, + "flt_rot": { + "description": "Fault from the RoT", + "type": "boolean" + }, + "flt_sp": { + "description": "Fault from the SP", + "type": "boolean" + }, + "id": { + "$ref": "#/components/schemas/SpIgnitionSystemType" + }, + "power": { + "type": "boolean" + }, + "present": { + "type": "string", + "enum": [ + "yes" + ] + } + }, + "required": [ + "ctrl_detect_0", + "ctrl_detect_1", + "flt_a2", + "flt_a3", + "flt_rot", + "flt_sp", + "id", + "power", + "present" + ] + } + ] + }, + "SpIgnitionInfo": { + "type": "object", + "properties": { + "details": { + "$ref": "#/components/schemas/SpIgnition" + }, + "id": { + "$ref": "#/components/schemas/SpIdentifier" + } + }, + "required": [ + "details", + "id" + ] + }, + "SpIgnitionSystemType": { + "oneOf": [ + { + "type": "object", + "properties": { + "system_type": { + "type": "string", + "enum": [ + "gimlet" + ] + } + }, + "required": [ + "system_type" + ] + }, + { + "type": "object", + "properties": { + "system_type": { + "type": "string", + "enum": [ + "sidecar" + ] + } + }, + "required": [ + "system_type" + ] + }, + { + "type": "object", + "properties": { + "system_type": { + "type": "string", + "enum": [ + "psc" + ] + } + }, + "required": [ + "system_type" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "system_type": { + "type": "string", + "enum": [ + "unknown" + ] + } + }, + "required": [ + "id", + "system_type" + ] + }, + { + "type": "object", + "properties": { + "system_type": { + "type": "string", + "enum": [ + "cosmo" + ] + } + }, + "required": [ + "system_type" + ] + } + ] + }, + "SpSensorReading": { + "description": "Result of reading an SP sensor.", + "type": "object", + "properties": { + "result": { + "description": "Value (or error) from the sensor.", + "allOf": [ + { + "$ref": "#/components/schemas/SpSensorReadingResult" + } + ] + }, + "timestamp": { + "description": "SP-centric timestamp of when `result` was recorded from this sensor.\n\nCurrently this value represents \"milliseconds since the last SP boot\" and is primarily useful as a delta between sensors on this SP (assuming no reboot in between). The meaning could change with future SP releases.", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "result", + "timestamp" + ] + }, + "SpSensorReadingResult": { + "description": "Single reading (or error) from an SP sensor.", + "oneOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "success" + ] + }, + "value": { + "type": "number", + "format": "float" + } + }, + "required": [ + "kind", + "value" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "device_off" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "device_error" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "device_not_present" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "device_unavailable" + ] + } + }, + "required": [ + "kind" + ] + }, + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "device_timeout" + ] + } + }, + "required": [ + "kind" + ] + } + ] + }, + "SpState": { + "type": "object", + "properties": { + "base_mac_address": { + "type": "array", + "items": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "minItems": 6, + "maxItems": 6 + }, + "hubris_archive_id": { + "type": "string" + }, + "model": { + "type": "string" + }, + "power_state": { + "$ref": "#/components/schemas/PowerState" + }, + "revision": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "rot": { + "$ref": "#/components/schemas/RotState" + }, + "serial_number": { + "type": "string" + } + }, + "required": [ + "base_mac_address", + "hubris_archive_id", + "model", + "power_state", + "revision", + "rot", + "serial_number" + ] + }, + "SpType": { + "type": "string", + "enum": [ + "sled", + "power", + "switch" + ] + }, + "SpUpdateStatus": { + "oneOf": [ + { + "description": "The SP has no update status.", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "none" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "The SP is preparing to receive an update.\n\nMay or may not include progress, depending on the capabilities of the component being updated.", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "progress": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/UpdatePreparationProgress" + } + ] + }, + "state": { + "type": "string", + "enum": [ + "preparing" + ] + } + }, + "required": [ + "id", + "state" + ] + }, + { + "description": "The SP is currently receiving an update.", + "type": "object", + "properties": { + "bytes_received": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "id": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "in_progress" + ] + }, + "total_bytes": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "bytes_received", + "id", + "state", + "total_bytes" + ] + }, + { + "description": "The SP has completed receiving an update.", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "complete" + ] + } + }, + "required": [ + "id", + "state" + ] + }, + { + "description": "The SP has aborted an in-progress update.", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "aborted" + ] + } + }, + "required": [ + "id", + "state" + ] + }, + { + "description": "The update process failed.", + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "id": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "failed" + ] + } + }, + "required": [ + "code", + "id", + "state" + ] + }, + { + "description": "The update process failed with an RoT-specific error.", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "message": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "rot_error" + ] + } + }, + "required": [ + "id", + "message", + "state" + ] + } + ] + }, + "Speed": { + "oneOf": [ + { + "type": "object", + "properties": { + "speed": { + "type": "string", + "enum": [ + "speed100_m" + ] + } + }, + "required": [ + "speed" + ] + }, + { + "type": "object", + "properties": { + "speed": { + "type": "string", + "enum": [ + "speed1_g" + ] + } + }, + "required": [ + "speed" + ] + }, + { + "type": "object", + "properties": { + "speed": { + "type": "string", + "enum": [ + "speed10_g" + ] + } + }, + "required": [ + "speed" + ] + } + ] + }, + "TaskDump": { + "type": "object", + "properties": { + "archive_id": { + "description": "Hex-encoded Hubris archive ID.", + "type": "string" + }, + "base64_zip": { + "description": "Base64-encoded zip file containing dehydrated task dump.", + "type": "string" + }, + "bord": { + "description": "`BORD` field from the caboose.", + "type": "string" + }, + "gitc": { + "description": "`GITC` field from the caboose.", + "type": "string" + }, + "task_index": { + "description": "Index of the crashed task.", + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "timestamp": { + "description": "Hubris timestamp at which the task crash occurred.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "vers": { + "nullable": true, + "description": "`VERS` field from the caboose, if present.", + "type": "string" + } + }, + "required": [ + "archive_id", + "base64_zip", + "bord", + "gitc", + "task_index", + "timestamp" + ] + }, + "UpdateAbortBody": { + "type": "object", + "properties": { + "id": { + "description": "The ID of the update to abort.\n\nIf the SP is currently receiving an update with this ID, it will be aborted.\n\nIf the SP is currently receiving an update with a different ID, the abort request will fail.\n\nIf the SP is not currently receiving any update, the request to abort should succeed but will not have actually done anything.", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + }, + "UpdatePreparationProgress": { + "description": "Progress of an SP preparing to update.\n\nThe units of `current` and `total` are unspecified and defined by the SP; e.g., if preparing for an update requires erasing a flash device, this may indicate progress of that erasure without defining units (bytes, pages, sectors, etc.).", + "type": "object", + "properties": { + "current": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "total": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "current", + "total" + ] + }, + "IgnitionCommand": { + "description": "Ignition command.", + "type": "string", + "enum": [ + "power_on", + "power_off", + "power_reset" + ] + } + }, + "responses": { + "Error": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "SpComponentResetError": { + "description": "SpComponentResetError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpComponentResetError" + } + } + } + } + } + } +} diff --git a/openapi/gateway/gateway-latest.json b/openapi/gateway/gateway-latest.json index 91efc528193..7b2c936f827 120000 --- a/openapi/gateway/gateway-latest.json +++ b/openapi/gateway/gateway-latest.json @@ -1 +1 @@ -gateway-2.0.0-a1962e.json \ No newline at end of file +gateway-3.0.0-dacda2.json \ No newline at end of file diff --git a/openapi/installinator.json b/openapi/installinator.json index 65ec7f40017..748d301151c 100644 --- a/openapi/installinator.json +++ b/openapi/installinator.json @@ -65,7 +65,7 @@ "description": "A unique identifier for the update.", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForMupdateKind" + "$ref": "#/components/schemas/MupdateUuid" } } ], @@ -2317,7 +2317,12 @@ "slots_written" ] }, - "TypedUuidForMupdateKind": { + "MupdateUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::MupdateUuid", + "version": "*" + }, "type": "string", "format": "uuid" } diff --git a/openapi/nexus-internal.json b/openapi/nexus-internal.json index 94274e26b9e..3abf060df51 100644 --- a/openapi/nexus-internal.json +++ b/openapi/nexus-internal.json @@ -49,7 +49,7 @@ "name": "downstairs_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForDownstairsKind" + "$ref": "#/components/schemas/DownstairsUuid" } }, { @@ -57,7 +57,7 @@ "name": "upstairs_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForUpstairsKind" + "$ref": "#/components/schemas/UpstairsUuid" } } ], @@ -95,7 +95,7 @@ "name": "downstairs_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForDownstairsKind" + "$ref": "#/components/schemas/DownstairsUuid" } }, { @@ -103,7 +103,7 @@ "name": "upstairs_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForUpstairsKind" + "$ref": "#/components/schemas/UpstairsUuid" } } ], @@ -140,7 +140,7 @@ "name": "repair_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForUpstairsRepairKind" + "$ref": "#/components/schemas/UpstairsRepairUuid" } }, { @@ -148,7 +148,7 @@ "name": "upstairs_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForUpstairsKind" + "$ref": "#/components/schemas/UpstairsUuid" } } ], @@ -185,7 +185,7 @@ "name": "upstairs_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForUpstairsKind" + "$ref": "#/components/schemas/UpstairsUuid" } } ], @@ -222,7 +222,7 @@ "name": "upstairs_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForUpstairsKind" + "$ref": "#/components/schemas/UpstairsUuid" } } ], @@ -612,7 +612,7 @@ "name": "sled_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" } } ], @@ -644,7 +644,7 @@ "name": "sled_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" } } ], @@ -682,7 +682,7 @@ "name": "sled_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" } } ], @@ -778,7 +778,7 @@ "name": "propolis_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForPropolisKind" + "$ref": "#/components/schemas/PropolisUuid" } } ], @@ -816,7 +816,7 @@ "name": "volume_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForVolumeKind" + "$ref": "#/components/schemas/VolumeUuid" } } ], @@ -1240,7 +1240,7 @@ "description": "unique identifier for this blueprint", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -1281,7 +1281,7 @@ "description": "which blueprint this blueprint is based on", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -1394,7 +1394,7 @@ "$ref": "#/components/schemas/BlueprintDatasetDisposition" }, "id": { - "$ref": "#/components/schemas/TypedUuidForDatasetKind" + "$ref": "#/components/schemas/DatasetUuid" }, "kind": { "$ref": "#/components/schemas/DatasetKind" @@ -1514,13 +1514,13 @@ "$ref": "#/components/schemas/BlueprintPhysicalDiskDisposition" }, "id": { - "$ref": "#/components/schemas/TypedUuidForPhysicalDiskKind" + "$ref": "#/components/schemas/PhysicalDiskUuid" }, "identity": { "$ref": "#/components/schemas/DiskIdentity" }, "pool_id": { - "$ref": "#/components/schemas/TypedUuidForZpoolKind" + "$ref": "#/components/schemas/ZpoolUuid" } }, "required": [ @@ -1596,7 +1596,7 @@ "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForMupdateOverrideKind" + "$ref": "#/components/schemas/MupdateOverrideUuid" } ] }, @@ -1745,6 +1745,15 @@ } ] }, + "BlueprintUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::BlueprintUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "BlueprintZoneConfig": { "description": "Describes one Omicron-managed zone in a blueprint.\n\nPart of [`BlueprintSledConfig`].", "type": "object", @@ -1766,7 +1775,7 @@ ] }, "id": { - "$ref": "#/components/schemas/TypedUuidForOmicronZoneKind" + "$ref": "#/components/schemas/OmicronZoneUuid" }, "image_source": { "$ref": "#/components/schemas/BlueprintZoneImageSource" @@ -2604,10 +2613,10 @@ "type": "string" }, "dataset_id": { - "$ref": "#/components/schemas/TypedUuidForDatasetKind" + "$ref": "#/components/schemas/DatasetUuid" }, "zpool_id": { - "$ref": "#/components/schemas/TypedUuidForZpoolKind" + "$ref": "#/components/schemas/ZpoolUuid" } }, "required": [ @@ -2620,6 +2629,15 @@ "description": "The kind of dataset. See the `DatasetKind` enum in omicron-common for possible values.", "type": "string" }, + "DatasetUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::DatasetUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "DiscretionaryZonePlacement": { "type": "object", "properties": { @@ -3077,11 +3095,20 @@ "receive_task_cancelled" ] }, + "DownstairsRegionUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::DownstairsRegionUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "DownstairsUnderRepair": { "type": "object", "properties": { "region_uuid": { - "$ref": "#/components/schemas/TypedUuidForDownstairsRegionKind" + "$ref": "#/components/schemas/DownstairsRegionUuid" }, "target_addr": { "type": "string" @@ -3185,6 +3212,15 @@ } ] }, + "ExternalIpUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::ExternalIpUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "ExternalPortDiscovery": { "oneOf": [ { @@ -3825,6 +3861,15 @@ } ] }, + "MupdateOverrideUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::MupdateOverrideUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "Name": { "title": "A name unique within the parent collection", "description": "Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long.", @@ -4089,7 +4134,7 @@ "type": "string" }, "id": { - "$ref": "#/components/schemas/TypedUuidForExternalIpKind" + "$ref": "#/components/schemas/ExternalIpUuid" } }, "required": [ @@ -4102,7 +4147,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForExternalIpKind" + "$ref": "#/components/schemas/ExternalIpUuid" }, "ip": { "type": "string", @@ -4119,7 +4164,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForExternalIpKind" + "$ref": "#/components/schemas/ExternalIpUuid" }, "snat_cfg": { "$ref": "#/components/schemas/SourceNatConfig" @@ -4130,6 +4175,15 @@ "snat_cfg" ] }, + "OmicronZoneUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::OmicronZoneUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "OximeterInfo": { "description": "Message used to notify Nexus that this oximeter instance is up and running.", "type": "object", @@ -4454,7 +4508,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForPhysicalDiskKind" + "$ref": "#/components/schemas/PhysicalDiskUuid" }, "model": { "type": "string" @@ -4482,6 +4536,15 @@ "vendor" ] }, + "PhysicalDiskUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::PhysicalDiskUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "Ping": { "type": "object", "properties": { @@ -4570,7 +4633,7 @@ "sleds_getting_ntp_and_discretionary_zones": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, @@ -4579,35 +4642,35 @@ "additionalProperties": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForZpoolKind" + "$ref": "#/components/schemas/ZpoolUuid" } } }, "sleds_missing_ntp_zone": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, "sleds_waiting_for_ntp_zone": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, "sleds_without_ntp_zones_in_inventory": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, "sleds_without_zpools_for_ntp_zones": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, @@ -4685,7 +4748,7 @@ "description": "Decommissioned sleds that unexpectedly appeared as commissioned.", "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" } } }, @@ -4700,7 +4763,7 @@ "description": "Expunged disks not present in the parent blueprint.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/TypedUuidForPhysicalDiskKind" + "$ref": "#/components/schemas/PhysicalDiskUuid" } } }, @@ -4901,7 +4964,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForMupdateOverrideKind" + "$ref": "#/components/schemas/MupdateOverrideUuid" }, "type": { "type": "string", @@ -5056,7 +5119,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForOmicronZoneKind" + "$ref": "#/components/schemas/OmicronZoneUuid" }, "kind": { "$ref": "#/components/schemas/ZoneKind" @@ -5593,7 +5656,7 @@ "type": "boolean" }, "repair_id": { - "$ref": "#/components/schemas/TypedUuidForUpstairsRepairKind" + "$ref": "#/components/schemas/UpstairsRepairUuid" }, "repair_type": { "$ref": "#/components/schemas/UpstairsRepairType" @@ -5605,7 +5668,7 @@ } }, "session_id": { - "$ref": "#/components/schemas/TypedUuidForUpstairsSessionKind" + "$ref": "#/components/schemas/UpstairsSessionUuid" }, "time": { "type": "string", @@ -5647,7 +5710,7 @@ "type": "object", "properties": { "repair_id": { - "$ref": "#/components/schemas/TypedUuidForUpstairsRepairKind" + "$ref": "#/components/schemas/UpstairsRepairUuid" }, "repair_type": { "$ref": "#/components/schemas/UpstairsRepairType" @@ -5659,7 +5722,7 @@ } }, "session_id": { - "$ref": "#/components/schemas/TypedUuidForUpstairsSessionKind" + "$ref": "#/components/schemas/UpstairsSessionUuid" }, "time": { "type": "string", @@ -5907,6 +5970,15 @@ } ] }, + "SledUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::SledUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "SledVmmState": { "description": "A wrapper type containing a sled's total knowledge of the state of a VMM.", "type": "object", @@ -6081,50 +6153,6 @@ } } }, - "TypedUuidForBlueprintKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForDatasetKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForDownstairsRegionKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForExternalIpKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForMupdateOverrideKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForOmicronZoneKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForPhysicalDiskKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForSledKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForUpstairsRepairKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForUpstairsSessionKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForZpoolKind": { - "type": "string", - "format": "uuid" - }, "UplinkAddressConfig": { "type": "object", "properties": { @@ -6151,6 +6179,24 @@ "reconciliation" ] }, + "UpstairsRepairUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::UpstairsRepairUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "UpstairsSessionUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::UpstairsSessionUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "UserId": { "title": "A username for a local-only user", "description": "Usernames must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Usernames cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long.", @@ -6487,7 +6533,7 @@ "format": "uuid" }, "physical_disk_id": { - "$ref": "#/components/schemas/TypedUuidForPhysicalDiskKind" + "$ref": "#/components/schemas/PhysicalDiskUuid" }, "sled_id": { "type": "string", @@ -6500,11 +6546,30 @@ "sled_id" ] }, - "TypedUuidForDownstairsKind": { + "ZpoolUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::ZpoolUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "DownstairsUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::DownstairsUuid", + "version": "*" + }, "type": "string", "format": "uuid" }, - "TypedUuidForUpstairsKind": { + "UpstairsUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::UpstairsUuid", + "version": "*" + }, "type": "string", "format": "uuid" }, @@ -6520,11 +6585,21 @@ } ] }, - "TypedUuidForPropolisKind": { + "PropolisUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::PropolisUuid", + "version": "*" + }, "type": "string", "format": "uuid" }, - "TypedUuidForVolumeKind": { + "VolumeUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::VolumeUuid", + "version": "*" + }, "type": "string", "format": "uuid" } diff --git a/openapi/nexus-lockstep.json b/openapi/nexus-lockstep.json index 77b5c3d62c1..3c6eb35ed3c 100644 --- a/openapi/nexus-lockstep.json +++ b/openapi/nexus-lockstep.json @@ -187,7 +187,7 @@ "name": "demo_saga_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForDemoSagaKind" + "$ref": "#/components/schemas/DemoSagaUuid" } } ], @@ -974,7 +974,7 @@ "name": "instance_id", "required": true, "schema": { - "$ref": "#/components/schemas/TypedUuidForInstanceKind" + "$ref": "#/components/schemas/InstanceUuid" } } ], @@ -1555,7 +1555,7 @@ "description": "unique identifier for this blueprint", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -1596,7 +1596,7 @@ "description": "which blueprint this blueprint is based on", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -1709,7 +1709,7 @@ "$ref": "#/components/schemas/BlueprintDatasetDisposition" }, "id": { - "$ref": "#/components/schemas/TypedUuidForDatasetKind" + "$ref": "#/components/schemas/DatasetUuid" }, "kind": { "$ref": "#/components/schemas/DatasetKind" @@ -1858,7 +1858,7 @@ "description": "unique identifier for this blueprint", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -1883,7 +1883,7 @@ "description": "which blueprint this blueprint is based on", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -1951,13 +1951,13 @@ "$ref": "#/components/schemas/BlueprintPhysicalDiskDisposition" }, "id": { - "$ref": "#/components/schemas/TypedUuidForPhysicalDiskKind" + "$ref": "#/components/schemas/PhysicalDiskUuid" }, "identity": { "$ref": "#/components/schemas/DiskIdentity" }, "pool_id": { - "$ref": "#/components/schemas/TypedUuidForZpoolKind" + "$ref": "#/components/schemas/ZpoolUuid" } }, "required": [ @@ -2033,7 +2033,7 @@ "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForMupdateOverrideKind" + "$ref": "#/components/schemas/MupdateOverrideUuid" } ] }, @@ -2194,7 +2194,7 @@ "description": "id of the blueprint that the system is trying to make real", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -2218,7 +2218,7 @@ "type": "boolean" }, "target_id": { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } }, "required": [ @@ -2226,6 +2226,15 @@ "target_id" ] }, + "BlueprintUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::BlueprintUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "BlueprintZoneConfig": { "description": "Describes one Omicron-managed zone in a blueprint.\n\nPart of [`BlueprintSledConfig`].", "type": "object", @@ -2247,7 +2256,7 @@ ] }, "id": { - "$ref": "#/components/schemas/TypedUuidForOmicronZoneKind" + "$ref": "#/components/schemas/OmicronZoneUuid" }, "image_source": { "$ref": "#/components/schemas/BlueprintZoneImageSource" @@ -3316,12 +3325,21 @@ "description": "The kind of dataset. See the `DatasetKind` enum in omicron-common for possible values.", "type": "string" }, + "DatasetUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::DatasetUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "DemoSaga": { "description": "Identifies an instance of the demo saga", "type": "object", "properties": { "demo_saga_id": { - "$ref": "#/components/schemas/TypedUuidForDemoSagaKind" + "$ref": "#/components/schemas/DemoSagaUuid" }, "saga_id": { "type": "string", @@ -3333,6 +3351,15 @@ "saga_id" ] }, + "DemoSagaUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::DemoSagaUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "DiscretionaryZonePlacement": { "type": "object", "properties": { @@ -3461,6 +3488,15 @@ } ] }, + "ExternalIpUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::ExternalIpUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "FailedMgsUpdateReason": { "description": "Describes the reason why an SP component failed to update", "oneOf": [ @@ -3807,7 +3843,7 @@ "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" } ] }, @@ -4419,6 +4455,15 @@ "waiting" ] }, + "MupdateOverrideUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::MupdateOverrideUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "Name": { "title": "A name unique within the parent collection", "description": "Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long.", @@ -4635,7 +4680,7 @@ "type": "string" }, "id": { - "$ref": "#/components/schemas/TypedUuidForExternalIpKind" + "$ref": "#/components/schemas/ExternalIpUuid" } }, "required": [ @@ -4648,7 +4693,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForExternalIpKind" + "$ref": "#/components/schemas/ExternalIpUuid" }, "ip": { "type": "string", @@ -4665,7 +4710,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForExternalIpKind" + "$ref": "#/components/schemas/ExternalIpUuid" }, "snat_cfg": { "$ref": "#/components/schemas/SourceNatConfig" @@ -5034,6 +5079,15 @@ } ] }, + "OmicronZoneUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::OmicronZoneUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "OximeterReadMode": { "description": "Where oximeter should read from", "oneOf": [ @@ -5358,7 +5412,7 @@ "description": "which blueprint id we'd be fully caught up to upon completion", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -5415,6 +5469,15 @@ "disk_id" ] }, + "PhysicalDiskUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::PhysicalDiskUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "Ping": { "type": "object", "properties": { @@ -5503,7 +5566,7 @@ "sleds_getting_ntp_and_discretionary_zones": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, @@ -5512,35 +5575,35 @@ "additionalProperties": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForZpoolKind" + "$ref": "#/components/schemas/ZpoolUuid" } } }, "sleds_missing_ntp_zone": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, "sleds_waiting_for_ntp_zone": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, "sleds_without_ntp_zones_in_inventory": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, "sleds_without_zpools_for_ntp_zones": { "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "uniqueItems": true }, @@ -5618,7 +5681,7 @@ "description": "Decommissioned sleds that unexpectedly appeared as commissioned.", "type": "array", "items": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" } } }, @@ -5633,7 +5696,7 @@ "description": "Expunged disks not present in the parent blueprint.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/TypedUuidForPhysicalDiskKind" + "$ref": "#/components/schemas/PhysicalDiskUuid" } } }, @@ -5834,7 +5897,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForMupdateOverrideKind" + "$ref": "#/components/schemas/MupdateOverrideUuid" }, "type": { "type": "string", @@ -5989,7 +6052,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForOmicronZoneKind" + "$ref": "#/components/schemas/OmicronZoneUuid" }, "kind": { "$ref": "#/components/schemas/ZoneKind" @@ -6523,7 +6586,7 @@ "description": "blueprint id that we're \"fully drained up to\"\n\nIf this value is non-`None`, that means that:\n\n- saga creation is disallowed - no sagas are running - we have re-assigned sagas from other Nexus instances expunged in this blueprint or earlier - we have finished recovery for all those sagas (that had been assigned to us as of the re-assignment pass for this blueprint id)\n\nThis means that the only way we can wind up running another saga is if there's a new blueprint that expunges a different Nexus zone.", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -6544,7 +6607,7 @@ "description": "blueprint id associated with last successful saga reassignment\n\nSimilar to the generation number, this is used to track whether we've accounted for all sagas for all expungements up through this target blueprint.", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -6565,7 +6628,7 @@ "description": "blueprint id that saga recovery has \"caught up to\"\n\nThis means that we have finished recovering any sagas that were re-assigned to us due to expungements of other Nexus zones up through this blueprint. Put differently: we know that we will never be assigned more sagas due to expungement unless the target blueprint changes past this one.\n\nThis does not mean that we've fully drained all sagas up through this blueprint. There may still be sagas running.", "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForBlueprintKind" + "$ref": "#/components/schemas/BlueprintUuid" } ] }, @@ -6761,7 +6824,7 @@ "$ref": "#/components/schemas/HostPhase2Status" }, "sled_id": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" }, "zones": { "title": "IdOrdMap", @@ -6792,7 +6855,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForSledKind" + "$ref": "#/components/schemas/SledUuid" } }, "required": [ @@ -6894,6 +6957,15 @@ } ] }, + "SledUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::SledUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "SourceNatConfig": { "description": "An IP address and port range used for source NAT, i.e., making outbound network connections from guests or services.", "type": "object", @@ -7120,42 +7192,6 @@ } ] }, - "TypedUuidForBlueprintKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForDatasetKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForDemoSagaKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForExternalIpKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForMupdateOverrideKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForOmicronZoneKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForPhysicalDiskKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForSledKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForZpoolKind": { - "type": "string", - "format": "uuid" - }, "UninitializedSled": { "description": "A sled that has not been added to an initialized rack yet", "type": "object", @@ -7357,7 +7393,7 @@ "$ref": "#/components/schemas/TufRepoVersion" }, "zone_id": { - "$ref": "#/components/schemas/TypedUuidForOmicronZoneKind" + "$ref": "#/components/schemas/OmicronZoneUuid" }, "zone_type": { "$ref": "#/components/schemas/OmicronZoneType" @@ -7552,6 +7588,15 @@ "type": "string", "pattern": "^ox[ip]_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" }, + "ZpoolUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::ZpoolUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "IdSortMode": { "description": "Supported set of sort modes for scanning by id only.\n\nCurrently, we only support scanning in ascending order.", "oneOf": [ @@ -7583,7 +7628,12 @@ } ] }, - "TypedUuidForInstanceKind": { + "InstanceUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::InstanceUuid", + "version": "*" + }, "type": "string", "format": "uuid" } diff --git a/openapi/sled-agent/sled-agent-5.0.0-253577.json b/openapi/sled-agent/sled-agent-5.0.0-253577.json new file mode 100644 index 00000000000..2f35aeb083f --- /dev/null +++ b/openapi/sled-agent/sled-agent-5.0.0-253577.json @@ -0,0 +1,8438 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Oxide Sled Agent API", + "description": "API for interacting with individual sleds", + "contact": { + "url": "https://oxide.computer", + "email": "api@oxide.computer" + }, + "version": "5.0.0" + }, + "paths": { + "/artifacts": { + "get": { + "operationId": "artifact_list", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactListResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/artifacts/{sha256}": { + "put": { + "operationId": "artifact_put", + "parameters": [ + { + "in": "path", + "name": "sha256", + "required": true, + "schema": { + "type": "string", + "format": "hex string (32 bytes)" + } + }, + { + "in": "query", + "name": "generation", + "required": true, + "schema": { + "$ref": "#/components/schemas/Generation" + } + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactPutResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/artifacts/{sha256}/copy-from-depot": { + "post": { + "operationId": "artifact_copy_from_depot", + "parameters": [ + { + "in": "path", + "name": "sha256", + "required": true, + "schema": { + "type": "string", + "format": "hex string (32 bytes)" + } + }, + { + "in": "query", + "name": "generation", + "required": true, + "schema": { + "$ref": "#/components/schemas/Generation" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactCopyFromDepotBody" + } + } + }, + "required": true + }, + "responses": { + "202": { + "description": "successfully enqueued operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactCopyFromDepotResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/artifacts-config": { + "get": { + "operationId": "artifact_config_get", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactConfig" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "operationId": "artifact_config_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactConfig" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/bootstore/status": { + "get": { + "summary": "Get the internal state of the local bootstore node", + "operationId": "bootstore_status", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BootstoreStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/debug/switch-zone-policy": { + "get": { + "summary": "A debugging endpoint only used by `omdb` that allows us to test", + "description": "restarting the switch zone without restarting sled-agent. See for context.", + "operationId": "debug_operator_switch_zone_policy_get", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorSwitchZonePolicy" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "summary": "A debugging endpoint only used by `omdb` that allows us to test", + "description": "restarting the switch zone without restarting sled-agent. See for context.\n\nSetting the switch zone policy is asynchronous and inherently racy with the standard process of starting the switch zone. If the switch zone is in the process of being started or stopped when this policy is changed, the new policy may not take effect until that transition completes.", + "operationId": "debug_operator_switch_zone_policy_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OperatorSwitchZonePolicy" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/disks/{disk_id}": { + "put": { + "operationId": "disk_put", + "parameters": [ + { + "in": "path", + "name": "disk_id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiskEnsureBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiskRuntimeState" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/eip-gateways": { + "put": { + "summary": "Update per-NIC IP address <-> internet gateway mappings.", + "operationId": "set_eip_gateways", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalIpGatewayMap" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/inventory": { + "get": { + "summary": "Fetch basic information about this sled", + "operationId": "inventory", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/network-bootstore-config": { + "get": { + "summary": "This API endpoint is only reading the local sled agent's view of the", + "description": "bootstore. The boostore is a distributed data store that is eventually consistent. Reads from individual nodes may not represent the latest state.", + "operationId": "read_network_bootstore_config_cache", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EarlyNetworkConfig" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "operationId": "write_network_bootstore_config", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EarlyNetworkConfig" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/omicron-config": { + "put": { + "operationId": "omicron_config_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OmicronSledConfig" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sled-identifiers": { + "get": { + "summary": "Fetch sled identifiers", + "operationId": "sled_identifiers", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledIdentifiers" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sled-role": { + "get": { + "operationId": "sled_role_get", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledRole" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/sleds": { + "put": { + "summary": "Add a sled to a rack that was already initialized via RSS", + "operationId": "sled_add", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddSledRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/dladm-info": { + "get": { + "operationId": "support_dladm_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SledDiagnosticsQueryOutput", + "type": "array", + "items": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/health-check": { + "get": { + "operationId": "support_health_check", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SledDiagnosticsQueryOutput", + "type": "array", + "items": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/ipadm-info": { + "get": { + "operationId": "support_ipadm_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SledDiagnosticsQueryOutput", + "type": "array", + "items": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/logs/download/{zone}": { + "get": { + "summary": "This endpoint returns a zip file of a zone's logs organized by service.", + "operationId": "support_logs_download", + "parameters": [ + { + "in": "path", + "name": "zone", + "description": "The zone for which one would like to collect logs for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "max_rotated", + "description": "The max number of rotated logs to include in the final support bundle", + "required": true, + "schema": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + } + } + }, + "/support/logs/zones": { + "get": { + "summary": "This endpoint returns a list of known zones on a sled that have service", + "description": "logs that can be collected into a support bundle.", + "operationId": "support_logs", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_String", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/nvmeadm-info": { + "get": { + "operationId": "support_nvmeadm_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/pargs-info": { + "get": { + "operationId": "support_pargs_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SledDiagnosticsQueryOutput", + "type": "array", + "items": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/pfiles-info": { + "get": { + "operationId": "support_pfiles_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SledDiagnosticsQueryOutput", + "type": "array", + "items": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/pstack-info": { + "get": { + "operationId": "support_pstack_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SledDiagnosticsQueryOutput", + "type": "array", + "items": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/zfs-info": { + "get": { + "operationId": "support_zfs_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/zoneadm-info": { + "get": { + "operationId": "support_zoneadm_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support/zpool-info": { + "get": { + "operationId": "support_zpool_info", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledDiagnosticsQueryOutput" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support-bundles/{zpool_id}/{dataset_id}": { + "get": { + "summary": "List all support bundles within a particular dataset", + "operationId": "support_bundle_list", + "parameters": [ + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_SupportBundleMetadata", + "type": "array", + "items": { + "$ref": "#/components/schemas/SupportBundleMetadata" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support-bundles/{zpool_id}/{dataset_id}/{support_bundle_id}": { + "post": { + "summary": "Starts creation of a support bundle within a particular dataset", + "description": "Callers should transfer chunks of the bundle with \"support_bundle_transfer\", and then call \"support_bundle_finalize\" once the bundle has finished transferring.\n\nIf a support bundle was previously created without being finalized successfully, this endpoint will reset the state.\n\nIf a support bundle was previously created and finalized successfully, this endpoint will return metadata indicating that it already exists.", + "operationId": "support_bundle_start_creation", + "parameters": [ + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "201": { + "description": "successful creation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportBundleMetadata" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "summary": "Delete a support bundle from a particular dataset", + "operationId": "support_bundle_delete", + "parameters": [ + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "204": { + "description": "successful deletion" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support-bundles/{zpool_id}/{dataset_id}/{support_bundle_id}/download": { + "get": { + "summary": "Fetch a support bundle from a particular dataset", + "operationId": "support_bundle_download", + "parameters": [ + { + "in": "header", + "name": "range", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + } + }, + "head": { + "summary": "Fetch metadata about a support bundle from a particular dataset", + "operationId": "support_bundle_head", + "parameters": [ + { + "in": "header", + "name": "range", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + } + } + }, + "/support-bundles/{zpool_id}/{dataset_id}/{support_bundle_id}/download/{file}": { + "get": { + "summary": "Fetch a file within a support bundle from a particular dataset", + "operationId": "support_bundle_download_file", + "parameters": [ + { + "in": "header", + "name": "range", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "file", + "description": "The path of the file within the support bundle to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + } + }, + "head": { + "summary": "Fetch metadata about a file within a support bundle from a particular dataset", + "operationId": "support_bundle_head_file", + "parameters": [ + { + "in": "header", + "name": "range", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "file", + "description": "The path of the file within the support bundle to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + } + } + }, + "/support-bundles/{zpool_id}/{dataset_id}/{support_bundle_id}/finalize": { + "post": { + "summary": "Finalizes the creation of a support bundle", + "description": "If the requested hash matched the bundle, the bundle is created. Otherwise, an error is returned.", + "operationId": "support_bundle_finalize", + "parameters": [ + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + }, + { + "in": "query", + "name": "hash", + "required": true, + "schema": { + "type": "string", + "format": "hex string (32 bytes)" + } + } + ], + "responses": { + "201": { + "description": "successful creation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportBundleMetadata" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/support-bundles/{zpool_id}/{dataset_id}/{support_bundle_id}/index": { + "get": { + "summary": "Fetch the index (list of files within a support bundle)", + "operationId": "support_bundle_index", + "parameters": [ + { + "in": "header", + "name": "range", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + } + }, + "head": { + "summary": "Fetch metadata about the list of files within a support bundle", + "operationId": "support_bundle_head_index", + "parameters": [ + { + "in": "header", + "name": "range", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + } + ], + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + } + } + }, + "/support-bundles/{zpool_id}/{dataset_id}/{support_bundle_id}/transfer": { + "put": { + "summary": "Transfers a chunk of a support bundle within a particular dataset", + "operationId": "support_bundle_transfer", + "parameters": [ + { + "in": "path", + "name": "dataset_id", + "description": "The dataset on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/DatasetUuid" + } + }, + { + "in": "path", + "name": "support_bundle_id", + "description": "The ID of the support bundle itself", + "required": true, + "schema": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + { + "in": "path", + "name": "zpool_id", + "description": "The zpool on which this support bundle was provisioned", + "required": true, + "schema": { + "$ref": "#/components/schemas/ZpoolUuid" + } + }, + { + "in": "query", + "name": "offset", + "required": true, + "schema": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportBundleMetadata" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/switch-ports": { + "post": { + "operationId": "uplink_ensure", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SwitchPorts" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/v2p": { + "get": { + "summary": "List v2p mappings present on sled", + "operationId": "list_v2p", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_VirtualNetworkInterfaceHost", + "type": "array", + "items": { + "$ref": "#/components/schemas/VirtualNetworkInterfaceHost" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "summary": "Create a mapping from a virtual NIC to a physical host", + "operationId": "set_v2p", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VirtualNetworkInterfaceHost" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "summary": "Delete a mapping from a virtual NIC to a physical host", + "operationId": "del_v2p", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VirtualNetworkInterfaceHost" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/vmms/{propolis_id}": { + "put": { + "operationId": "vmm_register", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceEnsureBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledVmmState" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "operationId": "vmm_unregister", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VmmUnregisterResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/vmms/{propolis_id}/disks/{disk_id}/snapshot": { + "post": { + "summary": "Take a snapshot of a disk that is attached to an instance", + "operationId": "vmm_issue_disk_snapshot_request", + "parameters": [ + { + "in": "path", + "name": "disk_id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VmmIssueDiskSnapshotRequestBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VmmIssueDiskSnapshotRequestResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/vmms/{propolis_id}/external-ip": { + "put": { + "operationId": "vmm_put_external_ip", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceExternalIpBody" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "operationId": "vmm_delete_external_ip", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceExternalIpBody" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/vmms/{propolis_id}/state": { + "get": { + "operationId": "vmm_get_state", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SledVmmState" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "operationId": "vmm_put_state", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VmmPutStateBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VmmPutStateResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/vpc/{vpc_id}/firewall/rules": { + "put": { + "operationId": "vpc_firewall_rules_put", + "parameters": [ + { + "in": "path", + "name": "vpc_id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VpcFirewallRulesEnsureBody" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/vpc-routes": { + "get": { + "summary": "Get the current versions of VPC routing rules.", + "operationId": "list_vpc_routes", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_ResolvedVpcRouteState", + "type": "array", + "items": { + "$ref": "#/components/schemas/ResolvedVpcRouteState" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "summary": "Update VPC routing rules.", + "operationId": "set_vpc_routes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "Array_of_ResolvedVpcRouteSet", + "type": "array", + "items": { + "$ref": "#/components/schemas/ResolvedVpcRouteSet" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/zones": { + "get": { + "summary": "List the zones that are currently managed by the sled agent.", + "operationId": "zones_list", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_String", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/zones/bundle-cleanup": { + "post": { + "summary": "Trigger a zone bundle cleanup.", + "operationId": "zone_bundle_cleanup", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Map_of_CleanupCount", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/CleanupCount" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/zones/bundle-cleanup/context": { + "get": { + "summary": "Return context used by the zone-bundle cleanup task.", + "operationId": "zone_bundle_cleanup_context", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CleanupContext" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "summary": "Update context used by the zone-bundle cleanup task.", + "operationId": "zone_bundle_cleanup_context_update", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CleanupContextUpdate" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/zones/bundle-cleanup/utilization": { + "get": { + "summary": "Return utilization information about all zone bundles.", + "operationId": "zone_bundle_utilization", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Map_of_BundleUtilization", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/BundleUtilization" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/zones/bundles": { + "get": { + "summary": "List all zone bundles that exist, even for now-deleted zones.", + "operationId": "zone_bundle_list_all", + "parameters": [ + { + "in": "query", + "name": "filter", + "description": "An optional substring used to filter zone bundles.", + "schema": { + "nullable": true, + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_ZoneBundleMetadata", + "type": "array", + "items": { + "$ref": "#/components/schemas/ZoneBundleMetadata" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/zones/bundles/{zone_name}": { + "get": { + "summary": "List the zone bundles that are available for a running zone.", + "operationId": "zone_bundle_list", + "parameters": [ + { + "in": "path", + "name": "zone_name", + "description": "The name of the zone.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "title": "Array_of_ZoneBundleMetadata", + "type": "array", + "items": { + "$ref": "#/components/schemas/ZoneBundleMetadata" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/zones/bundles/{zone_name}/{bundle_id}": { + "get": { + "summary": "Fetch the binary content of a single zone bundle.", + "operationId": "zone_bundle_get", + "parameters": [ + { + "in": "path", + "name": "bundle_id", + "description": "The ID for this bundle itself.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "in": "path", + "name": "zone_name", + "description": "The name of the zone this bundle is derived from.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "summary": "Delete a zone bundle.", + "operationId": "zone_bundle_delete", + "parameters": [ + { + "in": "path", + "name": "bundle_id", + "description": "The ID for this bundle itself.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "in": "path", + "name": "zone_name", + "description": "The name of the zone this bundle is derived from.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "successful deletion" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + } + }, + "components": { + "schemas": { + "AddSledRequest": { + "description": "A request to Add a given sled after rack initialization has occurred", + "type": "object", + "properties": { + "sled_id": { + "$ref": "#/components/schemas/BaseboardId" + }, + "start_request": { + "$ref": "#/components/schemas/StartSledAgentRequest" + } + }, + "required": [ + "sled_id", + "start_request" + ] + }, + "ArtifactConfig": { + "type": "object", + "properties": { + "artifacts": { + "type": "array", + "items": { + "type": "string", + "format": "hex string (32 bytes)" + }, + "uniqueItems": true + }, + "generation": { + "$ref": "#/components/schemas/Generation" + } + }, + "required": [ + "artifacts", + "generation" + ] + }, + "ArtifactCopyFromDepotBody": { + "type": "object", + "properties": { + "depot_base_url": { + "type": "string" + } + }, + "required": [ + "depot_base_url" + ] + }, + "ArtifactCopyFromDepotResponse": { + "type": "object" + }, + "ArtifactListResponse": { + "type": "object", + "properties": { + "generation": { + "$ref": "#/components/schemas/Generation" + }, + "list": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "required": [ + "generation", + "list" + ] + }, + "ArtifactPutResponse": { + "type": "object", + "properties": { + "datasets": { + "description": "The number of valid M.2 artifact datasets we found on the sled. There is typically one of these datasets for each functional M.2.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "successful_writes": { + "description": "The number of valid writes to the M.2 artifact datasets. This should be less than or equal to the number of artifact datasets.", + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "required": [ + "datasets", + "successful_writes" + ] + }, + "Baseboard": { + "description": "Describes properties that should uniquely identify a Gimlet.", + "oneOf": [ + { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "model": { + "type": "string" + }, + "revision": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "type": { + "type": "string", + "enum": [ + "gimlet" + ] + } + }, + "required": [ + "identifier", + "model", + "revision", + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "unknown" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "model": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "pc" + ] + } + }, + "required": [ + "identifier", + "model", + "type" + ] + } + ] + }, + "BaseboardId": { + "description": "A representation of a Baseboard ID as used in the inventory subsystem This type is essentially the same as a `Baseboard` except it doesn't have a revision or HW type (Gimlet, PC, Unknown).", + "type": "object", + "properties": { + "part_number": { + "description": "Oxide Part Number", + "type": "string" + }, + "serial_number": { + "description": "Serial number (unique for a given part number)", + "type": "string" + } + }, + "required": [ + "part_number", + "serial_number" + ] + }, + "BfdMode": { + "description": "BFD connection mode.", + "type": "string", + "enum": [ + "single_hop", + "multi_hop" + ] + }, + "BfdPeerConfig": { + "type": "object", + "properties": { + "detection_threshold": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "local": { + "nullable": true, + "type": "string", + "format": "ip" + }, + "mode": { + "$ref": "#/components/schemas/BfdMode" + }, + "remote": { + "type": "string", + "format": "ip" + }, + "required_rx": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "switch": { + "$ref": "#/components/schemas/SwitchLocation" + } + }, + "required": [ + "detection_threshold", + "mode", + "remote", + "required_rx", + "switch" + ] + }, + "BgpConfig": { + "type": "object", + "properties": { + "asn": { + "description": "The autonomous system number for the BGP configuration.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "checker": { + "nullable": true, + "description": "Checker to apply to incoming messages.", + "default": null, + "type": "string" + }, + "originate": { + "description": "The set of prefixes for the BGP router to originate.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Ipv4Net" + } + }, + "shaper": { + "nullable": true, + "description": "Shaper to apply to outgoing messages.", + "default": null, + "type": "string" + } + }, + "required": [ + "asn", + "originate" + ] + }, + "BgpPeerConfig": { + "type": "object", + "properties": { + "addr": { + "description": "Address of the peer.", + "type": "string", + "format": "ipv4" + }, + "allowed_export": { + "description": "Define export policy for a peer.", + "default": { + "type": "no_filtering" + }, + "allOf": [ + { + "$ref": "#/components/schemas/ImportExportPolicy" + } + ] + }, + "allowed_import": { + "description": "Define import policy for a peer.", + "default": { + "type": "no_filtering" + }, + "allOf": [ + { + "$ref": "#/components/schemas/ImportExportPolicy" + } + ] + }, + "asn": { + "description": "The autonomous system number of the router the peer belongs to.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "communities": { + "description": "Include the provided communities in updates sent to the peer.", + "default": [], + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "connect_retry": { + "nullable": true, + "description": "The interval in seconds between peer connection retry attempts.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "delay_open": { + "nullable": true, + "description": "How long to delay sending open messages to a peer. In seconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "enforce_first_as": { + "description": "Enforce that the first AS in paths received from this peer is the peer's AS.", + "default": false, + "type": "boolean" + }, + "hold_time": { + "nullable": true, + "description": "How long to keep a session alive without a keepalive in seconds. Defaults to 6.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "idle_hold_time": { + "nullable": true, + "description": "How long to keep a peer in idle after a state machine reset in seconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "keepalive": { + "nullable": true, + "description": "The interval to send keepalive messages at.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "local_pref": { + "nullable": true, + "description": "Apply a local preference to routes received from this peer.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "md5_auth_key": { + "nullable": true, + "description": "Use the given key for TCP-MD5 authentication with the peer.", + "default": null, + "type": "string" + }, + "min_ttl": { + "nullable": true, + "description": "Require messages from a peer have a minimum IP time to live field.", + "default": null, + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "multi_exit_discriminator": { + "nullable": true, + "description": "Apply the provided multi-exit discriminator (MED) updates sent to the peer.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "port": { + "description": "Switch port the peer is reachable on.", + "type": "string" + }, + "remote_asn": { + "nullable": true, + "description": "Require that a peer has a specified ASN.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "vlan_id": { + "nullable": true, + "description": "Associate a VLAN ID with a BGP peer session.", + "default": null, + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "addr", + "asn", + "port" + ] + }, + "BlobStorageBackend": { + "description": "A storage backend for a disk whose initial contents are given explicitly by the specification.", + "type": "object", + "properties": { + "base64": { + "description": "The disk's initial contents, encoded as a base64 string.", + "type": "string" + }, + "readonly": { + "description": "Indicates whether the storage is read-only.", + "type": "boolean" + } + }, + "required": [ + "base64", + "readonly" + ], + "additionalProperties": false + }, + "Board": { + "description": "A VM's mainboard.", + "type": "object", + "properties": { + "chipset": { + "description": "The chipset to expose to guest software.", + "allOf": [ + { + "$ref": "#/components/schemas/Chipset" + } + ] + }, + "cpuid": { + "nullable": true, + "description": "The CPUID values to expose to the guest. If `None`, bhyve will derive default values from the host's CPUID values.", + "allOf": [ + { + "$ref": "#/components/schemas/Cpuid" + } + ] + }, + "cpus": { + "description": "The number of virtual logical processors attached to this VM.", + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "guest_hv_interface": { + "description": "The hypervisor platform to expose to the guest. The default is a bhyve-compatible interface with no additional features.\n\nFor compatibility with older versions of Propolis, this field is only serialized if it specifies a non-default interface.", + "allOf": [ + { + "$ref": "#/components/schemas/GuestHypervisorInterface" + } + ] + }, + "memory_mb": { + "description": "The amount of guest RAM attached to this VM.", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "chipset", + "cpus", + "memory_mb" + ], + "additionalProperties": false + }, + "BootImageHeader": { + "type": "object", + "properties": { + "data_size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "flags": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "image_name": { + "type": "string" + }, + "image_size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sha256": { + "type": "array", + "items": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "minItems": 32, + "maxItems": 32 + }, + "target_size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "data_size", + "flags", + "image_name", + "image_size", + "sha256", + "target_size" + ] + }, + "BootOrderEntry": { + "description": "An entry in the boot order stored in a [`BootSettings`] component.", + "type": "object", + "properties": { + "id": { + "description": "The ID of another component in the spec that Propolis should try to boot from.\n\nCurrently, only disk device components are supported.", + "allOf": [ + { + "$ref": "#/components/schemas/SpecKey" + } + ] + } + }, + "required": [ + "id" + ] + }, + "BootPartitionContents": { + "type": "object", + "properties": { + "boot_disk": { + "x-rust-type": { + "crate": "std", + "parameters": [ + { + "$ref": "#/components/schemas/M2Slot" + }, + { + "type": "string" + } + ], + "path": "::std::result::Result", + "version": "*" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "ok": { + "$ref": "#/components/schemas/M2Slot" + } + }, + "required": [ + "ok" + ] + }, + { + "type": "object", + "properties": { + "err": { + "type": "string" + } + }, + "required": [ + "err" + ] + } + ] + }, + "slot_a": { + "x-rust-type": { + "crate": "std", + "parameters": [ + { + "$ref": "#/components/schemas/BootPartitionDetails" + }, + { + "type": "string" + } + ], + "path": "::std::result::Result", + "version": "*" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "ok": { + "$ref": "#/components/schemas/BootPartitionDetails" + } + }, + "required": [ + "ok" + ] + }, + { + "type": "object", + "properties": { + "err": { + "type": "string" + } + }, + "required": [ + "err" + ] + } + ] + }, + "slot_b": { + "x-rust-type": { + "crate": "std", + "parameters": [ + { + "$ref": "#/components/schemas/BootPartitionDetails" + }, + { + "type": "string" + } + ], + "path": "::std::result::Result", + "version": "*" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "ok": { + "$ref": "#/components/schemas/BootPartitionDetails" + } + }, + "required": [ + "ok" + ] + }, + { + "type": "object", + "properties": { + "err": { + "type": "string" + } + }, + "required": [ + "err" + ] + } + ] + } + }, + "required": [ + "boot_disk", + "slot_a", + "slot_b" + ] + }, + "BootPartitionDetails": { + "type": "object", + "properties": { + "artifact_hash": { + "type": "string", + "format": "hex string (32 bytes)" + }, + "artifact_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "header": { + "$ref": "#/components/schemas/BootImageHeader" + } + }, + "required": [ + "artifact_hash", + "artifact_size", + "header" + ] + }, + "BootSettings": { + "description": "Settings supplied to the guest's firmware image that specify the order in which it should consider its options when selecting a device to try to boot from.", + "type": "object", + "properties": { + "order": { + "description": "An ordered list of components to attempt to boot from.", + "type": "array", + "items": { + "$ref": "#/components/schemas/BootOrderEntry" + } + } + }, + "required": [ + "order" + ], + "additionalProperties": false + }, + "BootstoreStatus": { + "type": "object", + "properties": { + "accepted_connections": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "established_connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EstablishedConnection" + } + }, + "fsm_ledger_generation": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "fsm_state": { + "type": "string" + }, + "negotiating_connections": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "network_config_ledger_generation": { + "nullable": true, + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "accepted_connections", + "established_connections", + "fsm_ledger_generation", + "fsm_state", + "negotiating_connections", + "peers" + ] + }, + "BundleUtilization": { + "description": "The portion of a debug dataset used for zone bundles.", + "type": "object", + "properties": { + "bytes_available": { + "description": "The total number of bytes available for zone bundles.\n\nThis is `dataset_quota` multiplied by the context's storage limit.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bytes_used": { + "description": "Total bundle usage, in bytes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "dataset_quota": { + "description": "The total dataset quota, in bytes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "bytes_available", + "bytes_used", + "dataset_quota" + ] + }, + "ByteCount": { + "description": "Byte count to express memory or storage capacity.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "Chipset": { + "description": "A kind of virtual chipset.", + "oneOf": [ + { + "description": "An Intel 440FX-compatible chipset.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "i440_fx" + ] + }, + "value": { + "$ref": "#/components/schemas/I440Fx" + } + }, + "required": [ + "type", + "value" + ], + "additionalProperties": false + } + ] + }, + "CleanupContext": { + "description": "Context provided for the zone bundle cleanup task.", + "type": "object", + "properties": { + "period": { + "description": "The period on which automatic checks and cleanup is performed.", + "allOf": [ + { + "$ref": "#/components/schemas/CleanupPeriod" + } + ] + }, + "priority": { + "description": "The priority ordering for keeping old bundles.", + "allOf": [ + { + "$ref": "#/components/schemas/PriorityOrder" + } + ] + }, + "storage_limit": { + "description": "The limit on the dataset quota available for zone bundles.", + "allOf": [ + { + "$ref": "#/components/schemas/StorageLimit" + } + ] + } + }, + "required": [ + "period", + "priority", + "storage_limit" + ] + }, + "CleanupContextUpdate": { + "description": "Parameters used to update the zone bundle cleanup context.", + "type": "object", + "properties": { + "period": { + "nullable": true, + "description": "The new period on which automatic cleanups are run.", + "allOf": [ + { + "$ref": "#/components/schemas/Duration" + } + ] + }, + "priority": { + "nullable": true, + "description": "The priority ordering for preserving old zone bundles.", + "allOf": [ + { + "$ref": "#/components/schemas/PriorityOrder" + } + ] + }, + "storage_limit": { + "nullable": true, + "description": "The new limit on the underlying dataset quota allowed for bundles.", + "type": "integer", + "format": "uint8", + "minimum": 0 + } + } + }, + "CleanupCount": { + "description": "The count of bundles / bytes removed during a cleanup operation.", + "type": "object", + "properties": { + "bundles": { + "description": "The number of bundles removed.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bytes": { + "description": "The number of bytes removed.", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "bundles", + "bytes" + ] + }, + "CleanupPeriod": { + "description": "A period on which bundles are automatically cleaned up.", + "allOf": [ + { + "$ref": "#/components/schemas/Duration" + } + ] + }, + "ComponentV0": { + "oneOf": [ + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/VirtioDisk" + }, + "type": { + "type": "string", + "enum": [ + "virtio_disk" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/NvmeDisk" + }, + "type": { + "type": "string", + "enum": [ + "nvme_disk" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/VirtioNic" + }, + "type": { + "type": "string", + "enum": [ + "virtio_nic" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/SerialPort" + }, + "type": { + "type": "string", + "enum": [ + "serial_port" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/PciPciBridge" + }, + "type": { + "type": "string", + "enum": [ + "pci_pci_bridge" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/QemuPvpanic" + }, + "type": { + "type": "string", + "enum": [ + "qemu_pvpanic" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/BootSettings" + }, + "type": { + "type": "string", + "enum": [ + "boot_settings" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/SoftNpuPciPort" + }, + "type": { + "type": "string", + "enum": [ + "soft_npu_pci_port" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/SoftNpuPort" + }, + "type": { + "type": "string", + "enum": [ + "soft_npu_port" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/SoftNpuP9" + }, + "type": { + "type": "string", + "enum": [ + "soft_npu_p9" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/P9fs" + }, + "type": { + "type": "string", + "enum": [ + "p9fs" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/MigrationFailureInjector" + }, + "type": { + "type": "string", + "enum": [ + "migration_failure_injector" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/CrucibleStorageBackend" + }, + "type": { + "type": "string", + "enum": [ + "crucible_storage_backend" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/FileStorageBackend" + }, + "type": { + "type": "string", + "enum": [ + "file_storage_backend" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/BlobStorageBackend" + }, + "type": { + "type": "string", + "enum": [ + "blob_storage_backend" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/VirtioNetworkBackend" + }, + "type": { + "type": "string", + "enum": [ + "virtio_network_backend" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "component": { + "$ref": "#/components/schemas/DlpiNetworkBackend" + }, + "type": { + "type": "string", + "enum": [ + "dlpi_network_backend" + ] + } + }, + "required": [ + "component", + "type" + ], + "additionalProperties": false + } + ] + }, + "CompressionAlgorithm": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "on" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "off" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "gzip" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "level": { + "$ref": "#/components/schemas/GzipLevel" + }, + "type": { + "type": "string", + "enum": [ + "gzip_n" + ] + } + }, + "required": [ + "level", + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "lz4" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "lzjb" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "zle" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "ConfigReconcilerInventory": { + "description": "Describes the last attempt made by the sled-agent-config-reconciler to reconcile the current sled config against the actual state of the sled.", + "type": "object", + "properties": { + "boot_partitions": { + "$ref": "#/components/schemas/BootPartitionContents" + }, + "datasets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ConfigReconcilerInventoryResult" + } + }, + "external_disks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ConfigReconcilerInventoryResult" + } + }, + "last_reconciled_config": { + "$ref": "#/components/schemas/OmicronSledConfig" + }, + "orphaned_datasets": { + "title": "IdOrdMap", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/OrphanedDataset" + } + ], + "path": "iddqd::IdOrdMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/OrphanedDataset" + }, + "uniqueItems": true + }, + "remove_mupdate_override": { + "nullable": true, + "description": "The result of removing the mupdate override file on disk.\n\n`None` if `remove_mupdate_override` was not provided in the sled config.", + "allOf": [ + { + "$ref": "#/components/schemas/RemoveMupdateOverrideInventory" + } + ] + }, + "zones": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ConfigReconcilerInventoryResult" + } + } + }, + "required": [ + "boot_partitions", + "datasets", + "external_disks", + "last_reconciled_config", + "orphaned_datasets", + "zones" + ] + }, + "ConfigReconcilerInventoryResult": { + "oneOf": [ + { + "type": "object", + "properties": { + "result": { + "type": "string", + "enum": [ + "ok" + ] + } + }, + "required": [ + "result" + ] + }, + { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "result": { + "type": "string", + "enum": [ + "err" + ] + } + }, + "required": [ + "message", + "result" + ] + } + ] + }, + "ConfigReconcilerInventoryStatus": { + "description": "Status of the sled-agent-config-reconciler task.", + "oneOf": [ + { + "description": "The reconciler task has not yet run for the first time since sled-agent started.", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "not_yet_run" + ] + } + }, + "required": [ + "status" + ] + }, + { + "description": "The reconciler task is actively running.", + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/OmicronSledConfig" + }, + "running_for": { + "$ref": "#/components/schemas/Duration" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "enum": [ + "running" + ] + } + }, + "required": [ + "config", + "running_for", + "started_at", + "status" + ] + }, + { + "description": "The reconciler task is currently idle, but previously did complete a reconciliation attempt.\n\nThis variant does not include the `OmicronSledConfig` used in the last attempt, because that's always available via [`ConfigReconcilerInventory::last_reconciled_config`].", + "type": "object", + "properties": { + "completed_at": { + "type": "string", + "format": "date-time" + }, + "ran_for": { + "$ref": "#/components/schemas/Duration" + }, + "status": { + "type": "string", + "enum": [ + "idle" + ] + } + }, + "required": [ + "completed_at", + "ran_for", + "status" + ] + } + ] + }, + "Cpuid": { + "description": "A set of CPUID values to expose to a guest.", + "type": "object", + "properties": { + "entries": { + "description": "A list of CPUID leaves/subleaves and their associated values.\n\nPropolis servers require that each entry's `leaf` be unique and that it falls in either the \"standard\" (0 to 0xFFFF) or \"extended\" (0x8000_0000 to 0x8000_FFFF) function ranges, since these are the only valid input ranges currently defined by Intel and AMD. See the Intel 64 and IA-32 Architectures Software Developer's Manual (June 2024) Table 3-17 and the AMD64 Architecture Programmer's Manual (March 2024) Volume 3's documentation of the CPUID instruction.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CpuidEntry" + } + }, + "vendor": { + "description": "The CPU vendor to emulate.\n\nCPUID leaves in the extended range (0x8000_0000 to 0x8000_FFFF) have vendor-defined semantics. Propolis uses this value to determine these semantics when deciding whether it needs to specialize the supplied template values for these leaves.", + "allOf": [ + { + "$ref": "#/components/schemas/CpuidVendor" + } + ] + } + }, + "required": [ + "entries", + "vendor" + ], + "additionalProperties": false + }, + "CpuidEntry": { + "description": "A full description of a CPUID leaf/subleaf and the values it produces.", + "type": "object", + "properties": { + "eax": { + "description": "The value to return in eax.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "ebx": { + "description": "The value to return in ebx.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "ecx": { + "description": "The value to return in ecx.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "edx": { + "description": "The value to return in edx.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "leaf": { + "description": "The leaf (function) number for this entry.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "subleaf": { + "nullable": true, + "description": "The subleaf (index) number for this entry, if it uses subleaves.", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "eax", + "ebx", + "ecx", + "edx", + "leaf" + ], + "additionalProperties": false + }, + "CpuidVendor": { + "description": "A CPU vendor to use when interpreting the meanings of CPUID leaves in the extended ID range (0x80000000 to 0x8000FFFF).", + "type": "string", + "enum": [ + "amd", + "intel" + ] + }, + "CrucibleStorageBackend": { + "description": "A Crucible storage backend.", + "type": "object", + "properties": { + "readonly": { + "description": "Indicates whether the storage is read-only.", + "type": "boolean" + }, + "request_json": { + "description": "A serialized `[crucible_client_types::VolumeConstructionRequest]`. This is stored in serialized form so that breaking changes to the definition of a `VolumeConstructionRequest` do not inadvertently break instance spec deserialization.\n\nWhen using a spec to initialize a new instance, the spec author must ensure this request is well-formed and can be deserialized by the version of `crucible_client_types` used by the target Propolis.", + "type": "string" + } + }, + "required": [ + "readonly", + "request_json" + ], + "additionalProperties": false + }, + "DatasetConfig": { + "description": "Configuration information necessary to request a single dataset.\n\nThese datasets are tracked directly by Nexus.", + "type": "object", + "properties": { + "compression": { + "description": "The compression mode to be used by the dataset", + "allOf": [ + { + "$ref": "#/components/schemas/CompressionAlgorithm" + } + ] + }, + "id": { + "description": "The UUID of the dataset being requested", + "allOf": [ + { + "$ref": "#/components/schemas/DatasetUuid" + } + ] + }, + "name": { + "description": "The dataset's name", + "allOf": [ + { + "$ref": "#/components/schemas/DatasetName" + } + ] + }, + "quota": { + "nullable": true, + "description": "The upper bound on the amount of storage used by this dataset", + "allOf": [ + { + "$ref": "#/components/schemas/ByteCount" + } + ] + }, + "reservation": { + "nullable": true, + "description": "The lower bound on the amount of storage usable by this dataset", + "allOf": [ + { + "$ref": "#/components/schemas/ByteCount" + } + ] + } + }, + "required": [ + "compression", + "id", + "name" + ] + }, + "DatasetKind": { + "description": "The kind of dataset. See the `DatasetKind` enum in omicron-common for possible values.", + "type": "string" + }, + "DatasetName": { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/DatasetKind" + }, + "pool_name": { + "$ref": "#/components/schemas/ZpoolName" + } + }, + "required": [ + "kind", + "pool_name" + ] + }, + "DatasetUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::DatasetUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "DhcpConfig": { + "description": "DHCP configuration for a port\n\nNot present here: Hostname (DHCPv4 option 12; used in DHCPv6 option 39); we use `InstanceRuntimeState::hostname` for this value.", + "type": "object", + "properties": { + "dns_servers": { + "description": "DNS servers to send to the instance\n\n(DHCPv4 option 6; DHCPv6 option 23)", + "type": "array", + "items": { + "type": "string", + "format": "ip" + } + }, + "host_domain": { + "nullable": true, + "description": "DNS zone this instance's hostname belongs to (e.g. the `project.example` part of `instance1.project.example`)\n\n(DHCPv4 option 15; used in DHCPv6 option 39)", + "type": "string" + }, + "search_domains": { + "description": "DNS search domains\n\n(DHCPv4 option 119; DHCPv6 option 24)", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "dns_servers", + "search_domains" + ] + }, + "DiskEnsureBody": { + "description": "Sent from to a sled agent to establish the runtime state of a Disk", + "type": "object", + "properties": { + "initial_runtime": { + "description": "Last runtime state of the Disk known to Nexus (used if the agent has never seen this Disk before).", + "allOf": [ + { + "$ref": "#/components/schemas/DiskRuntimeState" + } + ] + }, + "target": { + "description": "requested runtime state of the Disk", + "allOf": [ + { + "$ref": "#/components/schemas/DiskStateRequested" + } + ] + } + }, + "required": [ + "initial_runtime", + "target" + ] + }, + "DiskIdentity": { + "description": "Uniquely identifies a disk.", + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "serial": { + "type": "string" + }, + "vendor": { + "type": "string" + } + }, + "required": [ + "model", + "serial", + "vendor" + ] + }, + "DiskRuntimeState": { + "description": "Runtime state of the Disk, which includes its attach state and some minimal metadata", + "type": "object", + "properties": { + "disk_state": { + "description": "runtime state of the Disk", + "allOf": [ + { + "$ref": "#/components/schemas/DiskState" + } + ] + }, + "gen": { + "description": "generation number for this state", + "allOf": [ + { + "$ref": "#/components/schemas/Generation" + } + ] + }, + "time_updated": { + "description": "timestamp for this information", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "disk_state", + "gen", + "time_updated" + ] + }, + "DiskState": { + "description": "State of a Disk", + "oneOf": [ + { + "description": "Disk is being initialized", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "creating" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is ready but detached from any Instance", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "detached" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is ready to receive blocks from an external source", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "import_ready" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is importing blocks from a URL", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "importing_from_url" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is importing blocks from bulk writes", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "importing_from_bulk_writes" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is being finalized to state Detached", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "finalizing" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is undergoing maintenance", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "maintenance" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is being attached to the given Instance", + "type": "object", + "properties": { + "instance": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "attaching" + ] + } + }, + "required": [ + "instance", + "state" + ] + }, + { + "description": "Disk is attached to the given Instance", + "type": "object", + "properties": { + "instance": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "attached" + ] + } + }, + "required": [ + "instance", + "state" + ] + }, + { + "description": "Disk is being detached from the given Instance", + "type": "object", + "properties": { + "instance": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "detaching" + ] + } + }, + "required": [ + "instance", + "state" + ] + }, + { + "description": "Disk has been destroyed", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "destroyed" + ] + } + }, + "required": [ + "state" + ] + }, + { + "description": "Disk is unavailable", + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "faulted" + ] + } + }, + "required": [ + "state" + ] + } + ] + }, + "DiskStateRequested": { + "description": "Used to request a Disk state change", + "oneOf": [ + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "detached" + ] + } + }, + "required": [ + "state" + ] + }, + { + "type": "object", + "properties": { + "instance": { + "type": "string", + "format": "uuid" + }, + "state": { + "type": "string", + "enum": [ + "attached" + ] + } + }, + "required": [ + "instance", + "state" + ] + }, + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "destroyed" + ] + } + }, + "required": [ + "state" + ] + }, + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "faulted" + ] + } + }, + "required": [ + "state" + ] + } + ] + }, + "DiskVariant": { + "type": "string", + "enum": [ + "U2", + "M2" + ] + }, + "DlpiNetworkBackend": { + "description": "A network backend associated with a DLPI VNIC on the host.", + "type": "object", + "properties": { + "vnic_name": { + "description": "The name of the VNIC to use as a backend.", + "type": "string" + } + }, + "required": [ + "vnic_name" + ], + "additionalProperties": false + }, + "Duration": { + "type": "object", + "properties": { + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "nanos", + "secs" + ] + }, + "EarlyNetworkConfig": { + "description": "Network configuration required to bring up the control plane\n\nThe fields in this structure are those from [`crate::rack_init::RackInitializeRequest`] necessary for use beyond RSS. This is just for the initial rack configuration and cold boot purposes. Updates come from Nexus.", + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/EarlyNetworkConfigBody" + }, + "generation": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "schema_version": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "body", + "generation", + "schema_version" + ] + }, + "EarlyNetworkConfigBody": { + "description": "This is the actual configuration of EarlyNetworking.\n\nWe nest it below the \"header\" of `generation` and `schema_version` so that we can perform partial deserialization of `EarlyNetworkConfig` to only read the header and defer deserialization of the body once we know the schema version. This is possible via the use of [`serde_json::value::RawValue`] in future (post-v1) deserialization paths.", + "type": "object", + "properties": { + "ntp_servers": { + "description": "The external NTP server addresses.", + "type": "array", + "items": { + "type": "string" + } + }, + "rack_network_config": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RackNetworkConfigV2" + } + ] + } + }, + "required": [ + "ntp_servers" + ] + }, + "Error": { + "description": "Error information from a response.", + "type": "object", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "message", + "request_id" + ] + }, + "EstablishedConnection": { + "type": "object", + "properties": { + "addr": { + "type": "string" + }, + "baseboard": { + "$ref": "#/components/schemas/Baseboard" + } + }, + "required": [ + "addr", + "baseboard" + ] + }, + "ExternalIpGatewayMap": { + "description": "Per-NIC mappings from external IP addresses to the Internet Gateways which can choose them as a source.", + "type": "object", + "properties": { + "mappings": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + } + } + }, + "required": [ + "mappings" + ] + }, + "FileStorageBackend": { + "description": "A storage backend backed by a file in the host system's file system.", + "type": "object", + "properties": { + "block_size": { + "description": "Block size of the backend", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "path": { + "description": "A path to a file that backs a disk.", + "type": "string" + }, + "readonly": { + "description": "Indicates whether the storage is read-only.", + "type": "boolean" + }, + "workers": { + "nullable": true, + "description": "Optional worker threads for the file backend, exposed for testing only.", + "type": "integer", + "format": "uint", + "minimum": 1 + } + }, + "required": [ + "block_size", + "path", + "readonly" + ], + "additionalProperties": false + }, + "Generation": { + "description": "Generation numbers stored in the database, used for optimistic concurrency control", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "GuestHypervisorInterface": { + "description": "A hypervisor interface to expose to the guest.", + "oneOf": [ + { + "description": "Expose a bhyve-like interface (\"bhyve bhyve \" as the hypervisor ID in leaf 0x4000_0000 and no additional leaves or features).", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "bhyve" + ] + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + { + "description": "Expose a Hyper-V-compatible hypervisor interface with the supplied features enabled.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "hyper_v" + ] + }, + "value": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HyperVFeatureFlag" + }, + "uniqueItems": true + } + }, + "required": [ + "features" + ], + "additionalProperties": false + } + }, + "required": [ + "type", + "value" + ], + "additionalProperties": false + } + ] + }, + "GzipLevel": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "HostIdentifier": { + "description": "A `HostIdentifier` represents either an IP host or network (v4 or v6), or an entire VPC (identified by its VNI). It is used in firewall rule host filters.", + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ip" + ] + }, + "value": { + "$ref": "#/components/schemas/IpNet" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "vpc" + ] + }, + "value": { + "$ref": "#/components/schemas/Vni" + } + }, + "required": [ + "type", + "value" + ] + } + ] + }, + "HostPhase2DesiredContents": { + "description": "Describes the desired contents of a host phase 2 slot (i.e., the boot partition on one of the internal M.2 drives).", + "oneOf": [ + { + "description": "Do not change the current contents.\n\nWe use this value when we've detected a sled has been mupdated (and we don't want to overwrite phase 2 images until we understand how to recover from that mupdate) and as the default value when reading an [`OmicronSledConfig`] that was ledgered before this concept existed.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "current_contents" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "Set the phase 2 slot to the given artifact.\n\nThe artifact will come from an unpacked and distributed TUF repo.", + "type": "object", + "properties": { + "hash": { + "type": "string", + "format": "hex string (32 bytes)" + }, + "type": { + "type": "string", + "enum": [ + "artifact" + ] + } + }, + "required": [ + "hash", + "type" + ] + } + ] + }, + "HostPhase2DesiredSlots": { + "description": "Describes the desired contents for both host phase 2 slots.", + "type": "object", + "properties": { + "slot_a": { + "$ref": "#/components/schemas/HostPhase2DesiredContents" + }, + "slot_b": { + "$ref": "#/components/schemas/HostPhase2DesiredContents" + } + }, + "required": [ + "slot_a", + "slot_b" + ] + }, + "HostPortConfig": { + "type": "object", + "properties": { + "addrs": { + "description": "IP Address and prefix (e.g., `192.168.0.1/16`) to apply to switchport (must be in infra_ip pool). May also include an optional VLAN ID.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UplinkAddressConfig" + } + }, + "lldp": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/LldpPortConfig" + } + ] + }, + "port": { + "description": "Switchport to use for external connectivity", + "type": "string" + }, + "tx_eq": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/TxEqConfig" + } + ] + } + }, + "required": [ + "addrs", + "port" + ] + }, + "Hostname": { + "title": "An RFC-1035-compliant hostname", + "description": "A hostname identifies a host on a network, and is usually a dot-delimited sequence of labels, where each label contains only letters, digits, or the hyphen. See RFCs 1035 and 952 for more details.", + "type": "string", + "pattern": "^([a-zA-Z0-9]+[a-zA-Z0-9\\-]*(? for background.", + "oneOf": [ + { + "description": "Start the switch zone if a switch is present.\n\nThis is the default policy.", + "type": "object", + "properties": { + "policy": { + "type": "string", + "enum": [ + "start_if_switch_present" + ] + } + }, + "required": [ + "policy" + ] + }, + { + "description": "Even if a switch zone is present, stop the switch zone.", + "type": "object", + "properties": { + "policy": { + "type": "string", + "enum": [ + "stop_despite_switch_presence" + ] + } + }, + "required": [ + "policy" + ] + } + ] + }, + "OrphanedDataset": { + "type": "object", + "properties": { + "available": { + "$ref": "#/components/schemas/ByteCount" + }, + "id": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/DatasetUuid" + } + ] + }, + "mounted": { + "type": "boolean" + }, + "name": { + "$ref": "#/components/schemas/DatasetName" + }, + "reason": { + "type": "string" + }, + "used": { + "$ref": "#/components/schemas/ByteCount" + } + }, + "required": [ + "available", + "mounted", + "name", + "reason", + "used" + ] + }, + "P9fs": { + "description": "Describes a filesystem to expose through a P9 device.\n\nThis is only supported by Propolis servers compiled with the `falcon` feature.", + "type": "object", + "properties": { + "chunk_size": { + "description": "The chunk size to use in the 9P protocol. Vanilla Helios images should use 8192. Falcon Helios base images and Linux can use up to 65536.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "pci_path": { + "description": "The PCI path at which to attach the guest to this P9 filesystem.", + "allOf": [ + { + "$ref": "#/components/schemas/PciPath" + } + ] + }, + "source": { + "description": "The host source path to mount into the guest.", + "type": "string" + }, + "target": { + "description": "The 9P target filesystem tag.", + "type": "string" + } + }, + "required": [ + "chunk_size", + "pci_path", + "source", + "target" + ], + "additionalProperties": false + }, + "PciPath": { + "description": "A PCI bus/device/function tuple.", + "type": "object", + "properties": { + "bus": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "device": { + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "function": { + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "required": [ + "bus", + "device", + "function" + ] + }, + "PciPciBridge": { + "description": "A PCI-PCI bridge.", + "type": "object", + "properties": { + "downstream_bus": { + "description": "The logical bus number of this bridge's downstream bus. Other devices may use this bus number in their PCI paths to indicate they should be attached to this bridge's bus.", + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "pci_path": { + "description": "The PCI path at which to attach this bridge.", + "allOf": [ + { + "$ref": "#/components/schemas/PciPath" + } + ] + } + }, + "required": [ + "downstream_bus", + "pci_path" + ], + "additionalProperties": false + }, + "PhysicalDiskUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::PhysicalDiskUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "PortConfigV2": { + "type": "object", + "properties": { + "addresses": { + "description": "This port's addresses and optional vlan IDs", + "type": "array", + "items": { + "$ref": "#/components/schemas/UplinkAddressConfig" + } + }, + "autoneg": { + "description": "Whether or not to set autonegotiation", + "default": false, + "type": "boolean" + }, + "bgp_peers": { + "description": "BGP peers on this port", + "type": "array", + "items": { + "$ref": "#/components/schemas/BgpPeerConfig" + } + }, + "lldp": { + "nullable": true, + "description": "LLDP configuration for this port", + "allOf": [ + { + "$ref": "#/components/schemas/LldpPortConfig" + } + ] + }, + "port": { + "description": "Nmae of the port this config applies to.", + "type": "string" + }, + "routes": { + "description": "The set of routes associated with this port.", + "type": "array", + "items": { + "$ref": "#/components/schemas/RouteConfig" + } + }, + "switch": { + "description": "Switch the port belongs to.", + "allOf": [ + { + "$ref": "#/components/schemas/SwitchLocation" + } + ] + }, + "tx_eq": { + "nullable": true, + "description": "TX-EQ configuration for this port", + "allOf": [ + { + "$ref": "#/components/schemas/TxEqConfig" + } + ] + }, + "uplink_port_fec": { + "nullable": true, + "description": "Port forward error correction type.", + "allOf": [ + { + "$ref": "#/components/schemas/PortFec" + } + ] + }, + "uplink_port_speed": { + "description": "Port speed.", + "allOf": [ + { + "$ref": "#/components/schemas/PortSpeed" + } + ] + } + }, + "required": [ + "addresses", + "bgp_peers", + "port", + "routes", + "switch", + "uplink_port_speed" + ] + }, + "PortFec": { + "description": "Switchport FEC options", + "type": "string", + "enum": [ + "firecode", + "none", + "rs" + ] + }, + "PortSpeed": { + "description": "Switchport Speed options", + "type": "string", + "enum": [ + "speed0_g", + "speed1_g", + "speed10_g", + "speed25_g", + "speed40_g", + "speed50_g", + "speed100_g", + "speed200_g", + "speed400_g" + ] + }, + "PriorityDimension": { + "description": "A dimension along with bundles can be sorted, to determine priority.", + "oneOf": [ + { + "description": "Sorting by time, with older bundles with lower priority.", + "type": "string", + "enum": [ + "time" + ] + }, + { + "description": "Sorting by the cause for creating the bundle.", + "type": "string", + "enum": [ + "cause" + ] + } + ] + }, + "PriorityOrder": { + "description": "The priority order for bundles during cleanup.\n\nBundles are sorted along the dimensions in [`PriorityDimension`], with each dimension appearing exactly once. During cleanup, lesser-priority bundles are pruned first, to maintain the dataset quota. Note that bundles are sorted by each dimension in the order in which they appear, with each dimension having higher priority than the next.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PriorityDimension" + }, + "minItems": 2, + "maxItems": 2 + }, + "QemuPvpanic": { + "type": "object", + "properties": { + "enable_isa": { + "description": "Enable the QEMU PVPANIC ISA bus device (I/O port 0x505).", + "type": "boolean" + } + }, + "required": [ + "enable_isa" + ], + "additionalProperties": false + }, + "RackNetworkConfigV2": { + "description": "Initial network configuration", + "type": "object", + "properties": { + "bfd": { + "description": "BFD configuration for connecting the rack to external networks", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/BfdPeerConfig" + } + }, + "bgp": { + "description": "BGP configurations for connecting the rack to external networks", + "type": "array", + "items": { + "$ref": "#/components/schemas/BgpConfig" + } + }, + "infra_ip_first": { + "description": "First ip address to be used for configuring network infrastructure", + "type": "string", + "format": "ipv4" + }, + "infra_ip_last": { + "description": "Last ip address to be used for configuring network infrastructure", + "type": "string", + "format": "ipv4" + }, + "ports": { + "description": "Uplinks for connecting the rack to external networks", + "type": "array", + "items": { + "$ref": "#/components/schemas/PortConfigV2" + } + }, + "rack_subnet": { + "$ref": "#/components/schemas/Ipv6Net" + } + }, + "required": [ + "bgp", + "infra_ip_first", + "infra_ip_last", + "ports", + "rack_subnet" + ] + }, + "RemoveMupdateOverrideBootSuccessInventory": { + "description": "Status of removing the mupdate override on the boot disk.", + "oneOf": [ + { + "description": "The mupdate override was successfully removed.", + "type": "string", + "enum": [ + "removed" + ] + }, + { + "description": "No mupdate override was found.\n\nThis is considered a success for idempotency reasons.", + "type": "string", + "enum": [ + "no_override" + ] + } + ] + }, + "RemoveMupdateOverrideInventory": { + "description": "Status of removing the mupdate override in the inventory.", + "type": "object", + "properties": { + "boot_disk_result": { + "description": "The result of removing the mupdate override on the boot disk.", + "x-rust-type": { + "crate": "std", + "parameters": [ + { + "$ref": "#/components/schemas/RemoveMupdateOverrideBootSuccessInventory" + }, + { + "type": "string" + } + ], + "path": "::std::result::Result", + "version": "*" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "ok": { + "$ref": "#/components/schemas/RemoveMupdateOverrideBootSuccessInventory" + } + }, + "required": [ + "ok" + ] + }, + { + "type": "object", + "properties": { + "err": { + "type": "string" + } + }, + "required": [ + "err" + ] + } + ] + }, + "non_boot_message": { + "description": "What happened on non-boot disks.\n\nWe aren't modeling this out in more detail, because we plan to not try and keep ledgered data in sync across both disks in the future.", + "type": "string" + } + }, + "required": [ + "boot_disk_result", + "non_boot_message" + ] + }, + "ResolvedVpcFirewallRule": { + "description": "VPC firewall rule after object name resolution has been performed by Nexus", + "type": "object", + "properties": { + "action": { + "$ref": "#/components/schemas/VpcFirewallRuleAction" + }, + "direction": { + "$ref": "#/components/schemas/VpcFirewallRuleDirection" + }, + "filter_hosts": { + "nullable": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/HostIdentifier" + }, + "uniqueItems": true + }, + "filter_ports": { + "nullable": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/L4PortRange" + } + }, + "filter_protocols": { + "nullable": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/VpcFirewallRuleProtocol" + } + }, + "priority": { + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/VpcFirewallRuleStatus" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkInterface" + } + } + }, + "required": [ + "action", + "direction", + "priority", + "status", + "targets" + ] + }, + "ResolvedVpcRoute": { + "description": "A VPC route resolved into a concrete target.", + "type": "object", + "properties": { + "dest": { + "$ref": "#/components/schemas/IpNet" + }, + "target": { + "$ref": "#/components/schemas/RouterTarget" + } + }, + "required": [ + "dest", + "target" + ] + }, + "ResolvedVpcRouteSet": { + "description": "An updated set of routes for a given VPC and/or subnet.", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/RouterId" + }, + "routes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResolvedVpcRoute" + }, + "uniqueItems": true + }, + "version": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RouterVersion" + } + ] + } + }, + "required": [ + "id", + "routes" + ] + }, + "ResolvedVpcRouteState": { + "description": "Version information for routes on a given VPC subnet.", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/RouterId" + }, + "version": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RouterVersion" + } + ] + } + }, + "required": [ + "id" + ] + }, + "RouteConfig": { + "type": "object", + "properties": { + "destination": { + "description": "The destination of the route.", + "allOf": [ + { + "$ref": "#/components/schemas/IpNet" + } + ] + }, + "nexthop": { + "description": "The nexthop/gateway address.", + "type": "string", + "format": "ip" + }, + "rib_priority": { + "nullable": true, + "description": "The RIB priority (i.e. Admin Distance) associated with this route.", + "default": null, + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "vlan_id": { + "nullable": true, + "description": "The VLAN id associated with this route.", + "default": null, + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "destination", + "nexthop" + ] + }, + "RouterId": { + "description": "Identifier for a VPC and/or subnet.", + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/RouterKind" + }, + "vni": { + "$ref": "#/components/schemas/Vni" + } + }, + "required": [ + "kind", + "vni" + ] + }, + "RouterKind": { + "description": "The scope of a set of VPC router rules.", + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "system" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "subnet": { + "$ref": "#/components/schemas/IpNet" + }, + "type": { + "type": "string", + "enum": [ + "custom" + ] + } + }, + "required": [ + "subnet", + "type" + ] + } + ] + }, + "RouterTarget": { + "description": "The target for a given router entry.", + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "drop" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "internet_gateway" + ] + }, + "value": { + "$ref": "#/components/schemas/InternetGatewayRouterTarget" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ip" + ] + }, + "value": { + "type": "string", + "format": "ip" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "vpc_subnet" + ] + }, + "value": { + "$ref": "#/components/schemas/IpNet" + } + }, + "required": [ + "type", + "value" + ] + } + ] + }, + "RouterVersion": { + "description": "Information on the current parent router (and version) of a route set according to the control plane.", + "type": "object", + "properties": { + "router_id": { + "type": "string", + "format": "uuid" + }, + "version": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "router_id", + "version" + ] + }, + "SerialPort": { + "description": "A serial port device.", + "type": "object", + "properties": { + "num": { + "description": "The serial port number for this port.", + "allOf": [ + { + "$ref": "#/components/schemas/SerialPortNumber" + } + ] + } + }, + "required": [ + "num" + ], + "additionalProperties": false + }, + "SerialPortNumber": { + "description": "A serial port identifier, which determines what I/O ports a guest can use to access a port.", + "type": "string", + "enum": [ + "com1", + "com2", + "com3", + "com4" + ] + }, + "SledCpuFamily": { + "description": "Identifies the kind of CPU present on a sled, determined by reading CPUID.\n\nThis is intended to broadly support the control plane answering the question \"can I run this instance on that sled?\" given an instance with either no or some CPU platform requirement. It is not enough information for more precise placement questions - for example, is a CPU a high-frequency part or many-core part? We don't include Genoa here, but in that CPU family there are high frequency parts, many-core parts, and large-cache parts. To support those questions (or satisfactorily answer #8730) we would need to collect additional information and send it along.", + "oneOf": [ + { + "description": "The CPU vendor or its family number don't correspond to any of the known family variants.", + "type": "string", + "enum": [ + "unknown" + ] + }, + { + "description": "AMD Milan processors (or very close). Could be an actual Milan in a Gimlet, a close-to-Milan client Zen 3 part, or Zen 4 (for which Milan is the greatest common denominator).", + "type": "string", + "enum": [ + "amd_milan" + ] + }, + { + "description": "AMD Turin processors (or very close). Could be an actual Turin in a Cosmo, or a close-to-Turin client Zen 5 part.", + "type": "string", + "enum": [ + "amd_turin" + ] + }, + { + "description": "AMD Turin Dense processors. There are no \"Turin Dense-like\" CPUs unlike other cases, so this means a bona fide Zen 5c Turin Dense part.", + "type": "string", + "enum": [ + "amd_turin_dense" + ] + } + ] + }, + "SledDiagnosticsQueryOutput": { + "oneOf": [ + { + "type": "object", + "properties": { + "success": { + "type": "object", + "properties": { + "command": { + "description": "The command and its arguments.", + "type": "string" + }, + "exit_code": { + "nullable": true, + "description": "The exit code if one was present when the command exited.", + "type": "integer", + "format": "int32" + }, + "exit_status": { + "description": "The exit status of the command. This will be the exit code (if any) and exit reason such as from a signal.", + "type": "string" + }, + "stdio": { + "description": "Any stdout/stderr produced by the command.", + "type": "string" + } + }, + "required": [ + "command", + "exit_status", + "stdio" + ] + } + }, + "required": [ + "success" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "failure": { + "type": "object", + "properties": { + "error": { + "description": "The reason the command failed to execute.", + "type": "string" + } + }, + "required": [ + "error" + ] + } + }, + "required": [ + "failure" + ], + "additionalProperties": false + } + ] + }, + "SledIdentifiers": { + "description": "Identifiers for a single sled.\n\nThis is intended primarily to be used in timeseries, to identify sled from which metric data originates.", + "type": "object", + "properties": { + "model": { + "description": "Model name of the sled", + "type": "string" + }, + "rack_id": { + "description": "Control plane ID of the rack this sled is a member of", + "type": "string", + "format": "uuid" + }, + "revision": { + "description": "Revision number of the sled", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "serial": { + "description": "Serial number of the sled", + "type": "string" + }, + "sled_id": { + "description": "Control plane ID for the sled itself", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "model", + "rack_id", + "revision", + "serial", + "sled_id" + ] + }, + "SledRole": { + "description": "Describes the role of the sled within the rack.\n\nNote that this may change if the sled is physically moved within the rack.", + "oneOf": [ + { + "description": "The sled is a general compute sled.", + "type": "string", + "enum": [ + "gimlet" + ] + }, + { + "description": "The sled is attached to the network switch, and has additional responsibilities.", + "type": "string", + "enum": [ + "scrimlet" + ] + } + ] + }, + "SledUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::SledUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "SledVmmState": { + "description": "A wrapper type containing a sled's total knowledge of the state of a VMM.", + "type": "object", + "properties": { + "migration_in": { + "nullable": true, + "description": "The current state of any inbound migration to this VMM.", + "allOf": [ + { + "$ref": "#/components/schemas/MigrationRuntimeState" + } + ] + }, + "migration_out": { + "nullable": true, + "description": "The state of any outbound migration from this VMM.", + "allOf": [ + { + "$ref": "#/components/schemas/MigrationRuntimeState" + } + ] + }, + "vmm_state": { + "description": "The most recent state of the sled's VMM process.", + "allOf": [ + { + "$ref": "#/components/schemas/VmmRuntimeState" + } + ] + } + }, + "required": [ + "vmm_state" + ] + }, + "SoftNpuP9": { + "description": "Describes a PCI device that shares host files with the guest using the P9 protocol.\n\nThis is only supported by Propolis servers compiled with the `falcon` feature.", + "type": "object", + "properties": { + "pci_path": { + "description": "The PCI path at which to attach the guest to this port.", + "allOf": [ + { + "$ref": "#/components/schemas/PciPath" + } + ] + } + }, + "required": [ + "pci_path" + ], + "additionalProperties": false + }, + "SoftNpuPciPort": { + "description": "Describes a SoftNPU PCI device.\n\nThis is only supported by Propolis servers compiled with the `falcon` feature.", + "type": "object", + "properties": { + "pci_path": { + "description": "The PCI path at which to attach the guest to this port.", + "allOf": [ + { + "$ref": "#/components/schemas/PciPath" + } + ] + } + }, + "required": [ + "pci_path" + ], + "additionalProperties": false + }, + "SoftNpuPort": { + "description": "Describes a port in a SoftNPU emulated ASIC.\n\nThis is only supported by Propolis servers compiled with the `falcon` feature.", + "type": "object", + "properties": { + "backend_id": { + "description": "The name of the port's associated DLPI backend.", + "allOf": [ + { + "$ref": "#/components/schemas/SpecKey" + } + ] + }, + "link_name": { + "description": "The data link name for this port.", + "type": "string" + } + }, + "required": [ + "backend_id", + "link_name" + ], + "additionalProperties": false + }, + "SourceNatConfig": { + "description": "An IP address and port range used for source NAT, i.e., making outbound network connections from guests or services.", + "type": "object", + "properties": { + "first_port": { + "description": "The first port used for source NAT, inclusive.", + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "ip": { + "description": "The external address provided to the instance or service.", + "type": "string", + "format": "ip" + }, + "last_port": { + "description": "The last port used for source NAT, also inclusive.", + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "first_port", + "ip", + "last_port" + ] + }, + "SpecKey": { + "description": "A key identifying a component in an instance spec.", + "oneOf": [ + { + "title": "uuid", + "allOf": [ + { + "type": "string", + "format": "uuid" + } + ] + }, + { + "title": "name", + "allOf": [ + { + "type": "string" + } + ] + } + ] + }, + "StartSledAgentRequest": { + "description": "Configuration information for launching a Sled Agent.", + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/StartSledAgentRequestBody" + }, + "generation": { + "description": "The current generation number of data as stored in CRDB.\n\nThe initial generation is set during RSS time and then only mutated by Nexus. For now, we don't actually anticipate mutating this data, but we leave open the possiblity.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "schema_version": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "body", + "generation", + "schema_version" + ] + }, + "StartSledAgentRequestBody": { + "description": "This is the actual app level data of `StartSledAgentRequest`\n\nWe nest it below the \"header\" of `generation` and `schema_version` so that we can perform partial deserialization of `EarlyNetworkConfig` to only read the header and defer deserialization of the body once we know the schema version. This is possible via the use of [`serde_json::value::RawValue`] in future (post-v1) deserialization paths.", + "type": "object", + "properties": { + "id": { + "description": "Uuid of the Sled Agent to be created.", + "allOf": [ + { + "$ref": "#/components/schemas/SledUuid" + } + ] + }, + "is_lrtq_learner": { + "description": "Is this node an LRTQ learner node?\n\nWe only put the node into learner mode if `use_trust_quorum` is also true.", + "type": "boolean" + }, + "rack_id": { + "description": "Uuid of the rack to which this sled agent belongs.", + "type": "string", + "format": "uuid" + }, + "subnet": { + "description": "Portion of the IP space to be managed by the Sled Agent.", + "allOf": [ + { + "$ref": "#/components/schemas/Ipv6Subnet" + } + ] + }, + "use_trust_quorum": { + "description": "Use trust quorum for key generation", + "type": "boolean" + } + }, + "required": [ + "id", + "is_lrtq_learner", + "rack_id", + "subnet", + "use_trust_quorum" + ] + }, + "StorageLimit": { + "description": "The limit on space allowed for zone bundles, as a percentage of the overall dataset's quota.", + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "SupportBundleMetadata": { + "description": "Metadata about a support bundle", + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/SupportBundleState" + }, + "support_bundle_id": { + "$ref": "#/components/schemas/SupportBundleUuid" + } + }, + "required": [ + "state", + "support_bundle_id" + ] + }, + "SupportBundleState": { + "type": "string", + "enum": [ + "complete", + "incomplete" + ] + }, + "SupportBundleUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::SupportBundleUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "SwitchLocation": { + "description": "Identifies switch physical location", + "oneOf": [ + { + "description": "Switch in upper slot", + "type": "string", + "enum": [ + "switch0" + ] + }, + { + "description": "Switch in lower slot", + "type": "string", + "enum": [ + "switch1" + ] + } + ] + }, + "SwitchPorts": { + "description": "A set of switch uplinks.", + "type": "object", + "properties": { + "uplinks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HostPortConfig" + } + } + }, + "required": [ + "uplinks" + ] + }, + "TxEqConfig": { + "description": "Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity.", + "type": "object", + "properties": { + "main": { + "nullable": true, + "description": "Main tap", + "type": "integer", + "format": "int32" + }, + "post1": { + "nullable": true, + "description": "Post-cursor tap1", + "type": "integer", + "format": "int32" + }, + "post2": { + "nullable": true, + "description": "Post-cursor tap2", + "type": "integer", + "format": "int32" + }, + "pre1": { + "nullable": true, + "description": "Pre-cursor tap1", + "type": "integer", + "format": "int32" + }, + "pre2": { + "nullable": true, + "description": "Pre-cursor tap2", + "type": "integer", + "format": "int32" + } + } + }, + "UplinkAddressConfig": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/IpNet" + }, + "vlan_id": { + "nullable": true, + "description": "The VLAN id (if any) associated with this address.", + "default": null, + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "address" + ] + }, + "VirtioDisk": { + "description": "A disk that presents a virtio-block interface to the guest.", + "type": "object", + "properties": { + "backend_id": { + "description": "The name of the disk's backend component.", + "allOf": [ + { + "$ref": "#/components/schemas/SpecKey" + } + ] + }, + "pci_path": { + "description": "The PCI bus/device/function at which this disk should be attached.", + "allOf": [ + { + "$ref": "#/components/schemas/PciPath" + } + ] + } + }, + "required": [ + "backend_id", + "pci_path" + ], + "additionalProperties": false + }, + "VirtioNetworkBackend": { + "description": "A network backend associated with a virtio-net (viona) VNIC on the host.", + "type": "object", + "properties": { + "vnic_name": { + "description": "The name of the viona VNIC to use as a backend.", + "type": "string" + } + }, + "required": [ + "vnic_name" + ], + "additionalProperties": false + }, + "VirtioNic": { + "description": "A network card that presents a virtio-net interface to the guest.", + "type": "object", + "properties": { + "backend_id": { + "description": "The name of the device's backend.", + "allOf": [ + { + "$ref": "#/components/schemas/SpecKey" + } + ] + }, + "interface_id": { + "description": "A caller-defined correlation identifier for this interface. If Propolis is configured to collect network interface kstats in its Oximeter metrics, the metric series for this interface will be associated with this identifier.", + "type": "string", + "format": "uuid" + }, + "pci_path": { + "description": "The PCI path at which to attach this device.", + "allOf": [ + { + "$ref": "#/components/schemas/PciPath" + } + ] + } + }, + "required": [ + "backend_id", + "interface_id", + "pci_path" + ], + "additionalProperties": false + }, + "VirtualNetworkInterfaceHost": { + "description": "A mapping from a virtual NIC to a physical host", + "type": "object", + "properties": { + "physical_host_ip": { + "type": "string", + "format": "ipv6" + }, + "virtual_ip": { + "type": "string", + "format": "ip" + }, + "virtual_mac": { + "$ref": "#/components/schemas/MacAddr" + }, + "vni": { + "$ref": "#/components/schemas/Vni" + } + }, + "required": [ + "physical_host_ip", + "virtual_ip", + "virtual_mac", + "vni" + ] + }, + "VmmIssueDiskSnapshotRequestBody": { + "type": "object", + "properties": { + "snapshot_id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "snapshot_id" + ] + }, + "VmmIssueDiskSnapshotRequestResponse": { + "type": "object", + "properties": { + "snapshot_id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "snapshot_id" + ] + }, + "VmmPutStateBody": { + "description": "The body of a request to move a previously-ensured instance into a specific runtime state.", + "type": "object", + "properties": { + "state": { + "description": "The state into which the instance should be driven.", + "allOf": [ + { + "$ref": "#/components/schemas/VmmStateRequested" + } + ] + } + }, + "required": [ + "state" + ] + }, + "VmmPutStateResponse": { + "description": "The response sent from a request to move an instance into a specific runtime state.", + "type": "object", + "properties": { + "updated_runtime": { + "nullable": true, + "description": "The current runtime state of the instance after handling the request to change its state. If the instance's state did not change, this field is `None`.", + "allOf": [ + { + "$ref": "#/components/schemas/SledVmmState" + } + ] + } + } + }, + "VmmRuntimeState": { + "description": "The dynamic runtime properties of an individual VMM process.", + "type": "object", + "properties": { + "gen": { + "description": "The generation number for this VMM's state.", + "allOf": [ + { + "$ref": "#/components/schemas/Generation" + } + ] + }, + "state": { + "description": "The last state reported by this VMM.", + "allOf": [ + { + "$ref": "#/components/schemas/VmmState" + } + ] + }, + "time_updated": { + "description": "Timestamp for the VMM's state.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "gen", + "state", + "time_updated" + ] + }, + "VmmSpec": { + "description": "Specifies the virtual hardware configuration of a new Propolis VMM in the form of a Propolis instance specification.\n\nSled-agent expects that when an instance spec is provided alongside an `InstanceSledLocalConfig` to initialize a new instance, the NIC IDs in that config's network interface list will match the IDs of the virtio network backends in the instance spec.", + "allOf": [ + { + "$ref": "#/components/schemas/InstanceSpecV0" + } + ] + }, + "VmmState": { + "description": "One of the states that a VMM can be in.", + "oneOf": [ + { + "description": "The VMM is initializing and has not started running guest CPUs yet.", + "type": "string", + "enum": [ + "starting" + ] + }, + { + "description": "The VMM has finished initializing and may be running guest CPUs.", + "type": "string", + "enum": [ + "running" + ] + }, + { + "description": "The VMM is shutting down.", + "type": "string", + "enum": [ + "stopping" + ] + }, + { + "description": "The VMM's guest has stopped, and the guest will not run again, but the VMM process may not have released all of its resources yet.", + "type": "string", + "enum": [ + "stopped" + ] + }, + { + "description": "The VMM is being restarted or its guest OS is rebooting.", + "type": "string", + "enum": [ + "rebooting" + ] + }, + { + "description": "The VMM is part of a live migration.", + "type": "string", + "enum": [ + "migrating" + ] + }, + { + "description": "The VMM process reported an internal failure.", + "type": "string", + "enum": [ + "failed" + ] + }, + { + "description": "The VMM process has been destroyed and its resources have been released.", + "type": "string", + "enum": [ + "destroyed" + ] + } + ] + }, + "VmmStateRequested": { + "description": "Requestable running state of an Instance.\n\nA subset of [`omicron_common::api::external::InstanceState`].", + "oneOf": [ + { + "description": "Run this instance by migrating in from a previous running incarnation of the instance.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "migration_target" + ] + }, + "value": { + "$ref": "#/components/schemas/InstanceMigrationTargetParams" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "description": "Start the instance if it is not already running.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "running" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "Stop the instance.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "stopped" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "Immediately reset the instance, as though it had stopped and immediately began to run again.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "reboot" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "VmmUnregisterResponse": { + "description": "The response sent from a request to unregister an instance.", + "type": "object", + "properties": { + "updated_runtime": { + "nullable": true, + "description": "The current state of the instance after handling the request to unregister it. If the instance's state did not change, this field is `None`.", + "allOf": [ + { + "$ref": "#/components/schemas/SledVmmState" + } + ] + } + } + }, + "Vni": { + "description": "A Geneve Virtual Network Identifier", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "VpcFirewallIcmpFilter": { + "type": "object", + "properties": { + "code": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/IcmpParamRange" + } + ] + }, + "icmp_type": { + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "required": [ + "icmp_type" + ] + }, + "VpcFirewallRuleAction": { + "type": "string", + "enum": [ + "allow", + "deny" + ] + }, + "VpcFirewallRuleDirection": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ] + }, + "VpcFirewallRuleProtocol": { + "description": "The protocols that may be specified in a firewall rule's filter", + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "tcp" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "udp" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "icmp" + ] + }, + "value": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/VpcFirewallIcmpFilter" + } + ] + } + }, + "required": [ + "type", + "value" + ] + } + ] + }, + "VpcFirewallRuleStatus": { + "type": "string", + "enum": [ + "disabled", + "enabled" + ] + }, + "VpcFirewallRulesEnsureBody": { + "description": "Update firewall rules for a VPC", + "type": "object", + "properties": { + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResolvedVpcFirewallRule" + } + }, + "vni": { + "$ref": "#/components/schemas/Vni" + } + }, + "required": [ + "rules", + "vni" + ] + }, + "ZoneArtifactInventory": { + "description": "Inventory representation of a single zone artifact on a boot disk.\n\nPart of [`ZoneManifestBootInventory`].", + "type": "object", + "properties": { + "expected_hash": { + "description": "The expected digest of the file's contents.", + "type": "string", + "format": "hex string (32 bytes)" + }, + "expected_size": { + "description": "The expected size of the file, in bytes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "file_name": { + "description": "The name of the zone file on disk, for example `nexus.tar.gz`. Zone files are always \".tar.gz\".", + "type": "string" + }, + "path": { + "description": "The full path to the zone file.", + "type": "string", + "format": "Utf8PathBuf" + }, + "status": { + "description": "The status of the artifact.\n\nThis is `Ok(())` if the artifact is present and matches the expected size and digest, or an error message if it is missing or does not match.", + "x-rust-type": { + "crate": "std", + "parameters": [ + { + "type": "null" + }, + { + "type": "string" + } + ], + "path": "::std::result::Result", + "version": "*" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "ok": { + "type": "string", + "enum": [ + null + ] + } + }, + "required": [ + "ok" + ] + }, + { + "type": "object", + "properties": { + "err": { + "type": "string" + } + }, + "required": [ + "err" + ] + } + ] + } + }, + "required": [ + "expected_hash", + "expected_size", + "file_name", + "path", + "status" + ] + }, + "ZoneBundleCause": { + "description": "The reason or cause for a zone bundle, i.e., why it was created.", + "oneOf": [ + { + "description": "Some other, unspecified reason.", + "type": "string", + "enum": [ + "other" + ] + }, + { + "description": "A zone bundle taken when a sled agent finds a zone that it does not expect to be running.", + "type": "string", + "enum": [ + "unexpected_zone" + ] + }, + { + "description": "An instance zone was terminated.", + "type": "string", + "enum": [ + "terminated_instance" + ] + } + ] + }, + "ZoneBundleId": { + "description": "An identifier for a zone bundle.", + "type": "object", + "properties": { + "bundle_id": { + "description": "The ID for this bundle itself.", + "type": "string", + "format": "uuid" + }, + "zone_name": { + "description": "The name of the zone this bundle is derived from.", + "type": "string" + } + }, + "required": [ + "bundle_id", + "zone_name" + ] + }, + "ZoneBundleMetadata": { + "description": "Metadata about a zone bundle.", + "type": "object", + "properties": { + "cause": { + "description": "The reason or cause a bundle was created.", + "allOf": [ + { + "$ref": "#/components/schemas/ZoneBundleCause" + } + ] + }, + "id": { + "description": "Identifier for this zone bundle", + "allOf": [ + { + "$ref": "#/components/schemas/ZoneBundleId" + } + ] + }, + "time_created": { + "description": "The time at which this zone bundle was created.", + "type": "string", + "format": "date-time" + }, + "version": { + "description": "A version number for this zone bundle.", + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "required": [ + "cause", + "id", + "time_created", + "version" + ] + }, + "ZoneImageResolverInventory": { + "description": "Inventory representation of zone image resolver status and health.", + "type": "object", + "properties": { + "mupdate_override": { + "description": "The mupdate override status.", + "allOf": [ + { + "$ref": "#/components/schemas/MupdateOverrideInventory" + } + ] + }, + "zone_manifest": { + "description": "The zone manifest status.", + "allOf": [ + { + "$ref": "#/components/schemas/ZoneManifestInventory" + } + ] + } + }, + "required": [ + "mupdate_override", + "zone_manifest" + ] + }, + "ZoneManifestBootInventory": { + "description": "Inventory representation of zone artifacts on the boot disk.\n\nPart of [`ZoneManifestInventory`].", + "type": "object", + "properties": { + "artifacts": { + "title": "IdOrdMap", + "description": "The artifacts on disk.", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/ZoneArtifactInventory" + } + ], + "path": "iddqd::IdOrdMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/ZoneArtifactInventory" + }, + "uniqueItems": true + }, + "source": { + "description": "The manifest source.\n\nIn production this is [`OmicronZoneManifestSource::Installinator`], but in some development and testing flows Sled Agent synthesizes zone manifests. In those cases, the source is [`OmicronZoneManifestSource::SledAgent`].", + "allOf": [ + { + "$ref": "#/components/schemas/OmicronZoneManifestSource" + } + ] + } + }, + "required": [ + "artifacts", + "source" + ] + }, + "ZoneManifestInventory": { + "description": "Inventory representation of a zone manifest.\n\nPart of [`ZoneImageResolverInventory`].\n\nA zone manifest is a listing of all the zones present in a system's install dataset. This struct contains information about the install dataset gathered from a system.", + "type": "object", + "properties": { + "boot_disk_path": { + "description": "The full path to the zone manifest file on the boot disk.", + "type": "string", + "format": "Utf8PathBuf" + }, + "boot_inventory": { + "description": "The manifest read from the boot disk, and whether the manifest is valid.", + "x-rust-type": { + "crate": "std", + "parameters": [ + { + "$ref": "#/components/schemas/ZoneManifestBootInventory" + }, + { + "type": "string" + } + ], + "path": "::std::result::Result", + "version": "*" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "ok": { + "$ref": "#/components/schemas/ZoneManifestBootInventory" + } + }, + "required": [ + "ok" + ] + }, + { + "type": "object", + "properties": { + "err": { + "type": "string" + } + }, + "required": [ + "err" + ] + } + ] + }, + "non_boot_status": { + "title": "IdOrdMap", + "description": "Information about the install dataset on non-boot disks.", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/ZoneManifestNonBootInventory" + } + ], + "path": "iddqd::IdOrdMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/ZoneManifestNonBootInventory" + }, + "uniqueItems": true + } + }, + "required": [ + "boot_disk_path", + "boot_inventory", + "non_boot_status" + ] + }, + "ZoneManifestNonBootInventory": { + "description": "Inventory representation of a zone manifest on a non-boot disk.\n\nUnlike [`ZoneManifestBootInventory`] which is structured since Reconfigurator makes decisions based on it, information about non-boot disks is purely advisory. For simplicity, we store information in an unstructured format.", + "type": "object", + "properties": { + "is_valid": { + "description": "Whether the status is valid.", + "type": "boolean" + }, + "message": { + "description": "A message describing the status.\n\nIf `is_valid` is true, then the message describes the list of artifacts found and their hashes.\n\nIf `is_valid` is false, then this message describes the reason for the invalid status. This could include errors reading the zone manifest, or zone file mismatches.", + "type": "string" + }, + "path": { + "description": "The full path to the zone manifest JSON on the non-boot disk.", + "type": "string", + "format": "Utf8PathBuf" + }, + "zpool_id": { + "description": "The ID of the non-boot zpool.", + "allOf": [ + { + "$ref": "#/components/schemas/InternalZpoolUuid" + } + ] + } + }, + "required": [ + "is_valid", + "message", + "path", + "zpool_id" + ] + }, + "ZpoolName": { + "title": "The name of a Zpool", + "description": "Zpool names are of the format ox{i,p}_. They are either Internal or External, and should be unique", + "type": "string", + "pattern": "^ox[ip]_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" + }, + "ZpoolUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::ZpoolUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "PropolisUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::PropolisUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + } + }, + "responses": { + "Error": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } +} diff --git a/openapi/sled-agent/sled-agent-latest.json b/openapi/sled-agent/sled-agent-latest.json index 381144dab9a..f4ffc5ac2ce 120000 --- a/openapi/sled-agent/sled-agent-latest.json +++ b/openapi/sled-agent/sled-agent-latest.json @@ -1 +1 @@ -sled-agent-4.0.0-fd6727.json \ No newline at end of file +sled-agent-5.0.0-253577.json \ No newline at end of file diff --git a/openapi/wicketd.json b/openapi/wicketd.json index 8f92403fec7..c0b41c90d8d 100644 --- a/openapi/wicketd.json +++ b/openapi/wicketd.json @@ -355,7 +355,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" } } } @@ -377,7 +377,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" } } } @@ -3346,14 +3346,23 @@ ], "additionalProperties": false }, + "RackInitUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::RackInitUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "RackOperationStatus": { - "description": "Current status of any rack-level operation being performed by this bootstrap agent.\n\n
JSON schema\n\n```json { \"description\": \"Current status of any rack-level operation being performed by this bootstrap agent.\", \"oneOf\": [ { \"type\": \"object\", \"required\": [ \"id\", \"status\", \"step\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/TypedUuidForRackInitKind\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"initializing\" ] }, \"step\": { \"$ref\": \"#/components/schemas/RssStep\" } } }, { \"description\": \"`id` will be none if the rack was already initialized on startup.\", \"type\": \"object\", \"required\": [ \"status\" ], \"properties\": { \"id\": { \"oneOf\": [ { \"type\": \"null\" }, { \"allOf\": [ { \"$ref\": \"#/components/schemas/TypedUuidForRackInitKind\" } ] } ] }, \"status\": { \"type\": \"string\", \"enum\": [ \"initialized\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"message\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/TypedUuidForRackInitKind\" }, \"message\": { \"type\": \"string\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"initialization_failed\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/TypedUuidForRackInitKind\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"initialization_panicked\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/TypedUuidForRackResetKind\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"resetting\" ] } } }, { \"description\": \"`reset_id` will be None if the rack is in an uninitialized-on-startup, or Some if it is in an uninitialized state due to a reset operation completing.\", \"type\": \"object\", \"required\": [ \"status\" ], \"properties\": { \"reset_id\": { \"oneOf\": [ { \"type\": \"null\" }, { \"allOf\": [ { \"$ref\": \"#/components/schemas/TypedUuidForRackResetKind\" } ] } ] }, \"status\": { \"type\": \"string\", \"enum\": [ \"uninitialized\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"message\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/TypedUuidForRackResetKind\" }, \"message\": { \"type\": \"string\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"reset_failed\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/TypedUuidForRackResetKind\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"reset_panicked\" ] } } } ] } ```
", + "description": "Current status of any rack-level operation being performed by this bootstrap agent.\n\n
JSON schema\n\n```json { \"description\": \"Current status of any rack-level operation being performed by this bootstrap agent.\", \"oneOf\": [ { \"type\": \"object\", \"required\": [ \"id\", \"status\", \"step\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/RackInitUuid\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"initializing\" ] }, \"step\": { \"$ref\": \"#/components/schemas/RssStep\" } } }, { \"description\": \"`id` will be none if the rack was already initialized on startup.\", \"type\": \"object\", \"required\": [ \"status\" ], \"properties\": { \"id\": { \"oneOf\": [ { \"type\": \"null\" }, { \"allOf\": [ { \"$ref\": \"#/components/schemas/RackInitUuid\" } ] } ] }, \"status\": { \"type\": \"string\", \"enum\": [ \"initialized\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"message\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/RackInitUuid\" }, \"message\": { \"type\": \"string\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"initialization_failed\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/RackInitUuid\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"initialization_panicked\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/RackResetUuid\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"resetting\" ] } } }, { \"description\": \"`reset_id` will be None if the rack is in an uninitialized-on-startup, or Some if it is in an uninitialized state due to a reset operation completing.\", \"type\": \"object\", \"required\": [ \"status\" ], \"properties\": { \"reset_id\": { \"oneOf\": [ { \"type\": \"null\" }, { \"allOf\": [ { \"$ref\": \"#/components/schemas/RackResetUuid\" } ] } ] }, \"status\": { \"type\": \"string\", \"enum\": [ \"uninitialized\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"message\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/RackResetUuid\" }, \"message\": { \"type\": \"string\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"reset_failed\" ] } } }, { \"type\": \"object\", \"required\": [ \"id\", \"status\" ], \"properties\": { \"id\": { \"$ref\": \"#/components/schemas/RackResetUuid\" }, \"status\": { \"type\": \"string\", \"enum\": [ \"reset_panicked\" ] } } } ] } ```
", "oneOf": [ { "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" }, "status": { "type": "string", @@ -3379,7 +3388,7 @@ "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" } ] }, @@ -3398,7 +3407,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" }, "message": { "type": "string" @@ -3420,7 +3429,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackInitKind" + "$ref": "#/components/schemas/RackInitUuid" }, "status": { "type": "string", @@ -3438,7 +3447,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" }, "status": { "type": "string", @@ -3460,7 +3469,7 @@ "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" } ] }, @@ -3479,7 +3488,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" }, "message": { "type": "string" @@ -3501,7 +3510,7 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForRackResetKind" + "$ref": "#/components/schemas/RackResetUuid" }, "status": { "type": "string", @@ -3517,6 +3526,15 @@ } ] }, + "RackResetUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::RackResetUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, "RackV1Inventory": { "description": "The current state of the v1 Rack as known to wicketd", "type": "object", @@ -7060,14 +7078,6 @@ } } }, - "TypedUuidForRackInitKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForRackResetKind": { - "type": "string", - "format": "uuid" - }, "UpdateComponent": { "oneOf": [ { diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 38372049b0f..1ebf2bb9133 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -67,6 +67,7 @@ api_versions!([ // | example for the next person. // v // (next_int, IDENT), + (5, NEWTYPE_UUID_BUMP), (4, ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY), (3, ADD_SWITCH_ZONE_OPERATOR_POLICY), (2, REMOVE_DESTROY_ORPHANED_DATASETS_CHICKEN_SWITCH), diff --git a/uuid-kinds/Cargo.toml b/uuid-kinds/Cargo.toml index 037c037889a..b1aef1ccd8c 100644 --- a/uuid-kinds/Cargo.toml +++ b/uuid-kinds/Cargo.toml @@ -14,6 +14,7 @@ workspace = true [dependencies] daft.workspace = true newtype-uuid.workspace = true +newtype-uuid-macros.workspace = true paste.workspace = true proptest = { workspace = true, optional = true } schemars = { workspace = true, optional = true } diff --git a/uuid-kinds/src/lib.rs b/uuid-kinds/src/lib.rs index c2bbc054ce2..354c6771494 100644 --- a/uuid-kinds/src/lib.rs +++ b/uuid-kinds/src/lib.rs @@ -15,31 +15,7 @@ pub use newtype_uuid::{ }; use daft::Diffable; -#[cfg(feature = "schemars08")] -use schemars::JsonSchema; - -macro_rules! impl_typed_uuid_kind { - ($($kind:ident => $tag:literal),* $(,)?) => { - $( - paste::paste! { - #[cfg_attr(feature = "schemars08", derive(JsonSchema))] - #[derive(Debug, PartialEq, Eq, Diffable)] - pub enum [< $kind Kind>] {} - - impl TypedUuidKind for [< $kind Kind >] { - #[inline] - fn tag() -> TypedUuidTag { - // `const` ensures that tags are validated at compile-time. - const TAG: TypedUuidTag = TypedUuidTag::new($tag); - TAG - } - } - - pub type [< $kind Uuid>] = TypedUuid::<[< $kind Kind >]>; - } - )* - }; -} +use newtype_uuid_macros::impl_typed_uuid_kinds; // NOTE: // @@ -49,60 +25,72 @@ macro_rules! impl_typed_uuid_kind { // repos. // // Please keep this list in alphabetical order. - -impl_typed_uuid_kind! { - AccessToken => "access_token", - AffinityGroup => "affinity_group", - Alert => "alert", - AlertReceiver => "alert_receiver", - AntiAffinityGroup => "anti_affinity_group", - Blueprint => "blueprint", - BuiltInUser => "built_in_user", - Collection => "collection", - ConsoleSession => "console_session", - Dataset => "dataset", - DemoSaga => "demo_saga", - Downstairs => "downstairs", - DownstairsRegion => "downstairs_region", - EreporterRestart => "ereporter_restart", - ExternalIp => "external_ip", - ExternalZpool => "external_zpool", - Instance => "instance", - InternalZpool => "internal_zpool", - LoopbackAddress => "loopback_address", - Mupdate => "mupdate", - MupdateOverride => "mupdate_override", - // `OmicronSledConfig`s do not themselves contain IDs, but we generate IDs - // for them when they're serialized to the database during inventory - // collection. This ID type is therefore only used by nexus-db-model and - // nexus-db-queries. - OmicronSledConfig => "omicron_sled_config", - OmicronZone => "service", - PhysicalDisk => "physical_disk", - Propolis => "propolis", - Rack => "rack", - RackInit => "rack_init", - RackReset => "rack_reset", - ReconfiguratorSim => "reconfigurator_sim", - Region => "region", - SiloGroup => "silo_group", - SiloUser => "silo_user", - Sled => "sled", - SpUpdate => "sp_update", - SupportBundle => "support_bundle", - TufArtifact => "tuf_artifact", - TufRepo => "tuf_repo", - TufTrustRoot => "tuf_trust_root", - Upstairs => "upstairs", - UpstairsRepair => "upstairs_repair", - UpstairsSession => "upstairs_session", - UserDataExport => "user_data_export", - Vnic => "vnic", - Volume => "volume", - WebhookDelivery => "webhook_delivery", - WebhookDeliveryAttempt => "webhook_delivery_attempt", - WebhookSecret => "webhook_secret", - Zpool => "zpool", +impl_typed_uuid_kinds! { + settings = { + attrs = [#[derive(Diffable)]], + schemars08 = { + attrs = [#[cfg(feature = "schemars08")]], + rust_type = { + crate = "omicron-uuid-kinds", + version = "*", + path = "omicron_uuid_kinds", + }, + }, + }, + kinds = { + AccessToken = {}, + AffinityGroup = {}, + Alert = {}, + AlertReceiver = {}, + AntiAffinityGroup = {}, + Blueprint = {}, + BuiltInUser = {}, + Collection = {}, + ConsoleSession = {}, + Dataset = {}, + DemoSaga = {}, + Downstairs = {}, + DownstairsRegion = {}, + EreporterRestart = {}, + ExternalIp = {}, + ExternalZpool = {}, + Instance = {}, + InternalZpool = {}, + LoopbackAddress = {}, + Mupdate = {}, + MupdateOverride = {}, + // `OmicronSledConfig`s do not themselves contain IDs, but we generate IDs + // for them when they're serialized to the database during inventory + // collection. This ID type is therefore only used by nexus-db-model and + // nexus-db-queries. + OmicronSledConfig = {}, + OmicronZone = {}, + PhysicalDisk = {}, + Propolis = {}, + Rack = {}, + RackInit = {}, + RackReset = {}, + ReconfiguratorSim = {}, + Region = {}, + SiloGroup = {}, + SiloUser = {}, + Sled = {}, + SpUpdate = {}, + SupportBundle = {}, + TufArtifact = {}, + TufRepo = {}, + TufTrustRoot = {}, + Upstairs = {}, + UpstairsRepair = {}, + UpstairsSession = {}, + UserDataExport = {}, + Vnic = {}, + Volume = {}, + WebhookDelivery = {}, + WebhookDeliveryAttempt = {}, + WebhookSecret = {}, + Zpool = {}, + }, } impl From for ZpoolKind { diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index 747427d8399..80db731d6fb 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -80,7 +80,7 @@ libc = { version = "0.2.174", features = ["extra_traits"] } log = { version = "0.4.27", default-features = false, features = ["kv_unstable", "std"] } managed = { version = "0.8.0", default-features = false, features = ["alloc", "map"] } memchr = { version = "2.7.4" } -newtype-uuid = { version = "1.2.4", features = ["proptest1"] } +newtype-uuid = { version = "1.3.1", features = ["proptest1"] } nix = { version = "0.29.0", features = ["feature", "net", "uio"] } num-bigint-dig = { version = "0.8.4", default-features = false, features = ["i128", "prime", "serde", "u64_digit", "zeroize"] } num-integer = { version = "0.1.46", features = ["i128"] } @@ -215,7 +215,7 @@ libc = { version = "0.2.174", features = ["extra_traits"] } log = { version = "0.4.27", default-features = false, features = ["kv_unstable", "std"] } managed = { version = "0.8.0", default-features = false, features = ["alloc", "map"] } memchr = { version = "2.7.4" } -newtype-uuid = { version = "1.2.4", features = ["proptest1"] } +newtype-uuid = { version = "1.3.1", features = ["proptest1"] } nix = { version = "0.29.0", features = ["feature", "net", "uio"] } num-bigint-dig = { version = "0.8.4", default-features = false, features = ["i128", "prime", "serde", "u64_digit", "zeroize"] } num-integer = { version = "0.1.46", features = ["i128"] } From d0ab0cff042d768f3497a78f7c2cebb6cb68061e Mon Sep 17 00:00:00 2001 From: Rain Date: Wed, 1 Oct 2025 19:52:18 +0000 Subject: [PATCH 2/3] actually specify version bump Created using spr 1.3.6-beta.1 --- cockroach-admin/src/lib.rs | 2 +- gateway/src/lib.rs | 2 +- sled-agent/src/server.rs | 25 +++++++++++-------------- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/cockroach-admin/src/lib.rs b/cockroach-admin/src/lib.rs index 9591e01433b..318962ef613 100644 --- a/cockroach-admin/src/lib.rs +++ b/cockroach-admin/src/lib.rs @@ -72,7 +72,7 @@ pub async fn start_server( .version_policy(dropshot::VersionPolicy::Dynamic(Box::new( dropshot::ClientSpecifiesVersionInHeader::new( omicron_common::api::VERSION_HEADER, - cockroach_admin_api::VERSION_INITIAL, + cockroach_admin_api::VERSION_NEWTYPE_UUID_BUMP, ), ))) .start() diff --git a/gateway/src/lib.rs b/gateway/src/lib.rs index dd89d4a5df8..6ed26eb0959 100644 --- a/gateway/src/lib.rs +++ b/gateway/src/lib.rs @@ -106,7 +106,7 @@ fn start_dropshot_server( .version_policy(dropshot::VersionPolicy::Dynamic(Box::new( dropshot::ClientSpecifiesVersionInHeader::new( omicron_common::api::VERSION_HEADER, - gateway_api::VERSION_COSMO, + gateway_api::VERSION_NEWTYPE_UUID_BUMP, ), ))) .start() diff --git a/sled-agent/src/server.rs b/sled-agent/src/server.rs index 5706bf717f1..4f3d63dac3c 100644 --- a/sled-agent/src/server.rs +++ b/sled-agent/src/server.rs @@ -73,20 +73,17 @@ impl Server { ..config.dropshot.clone() }; let dropshot_log = log.new(o!("component" => "dropshot (SledAgent)")); - let http_server = dropshot::ServerBuilder::new( - http_api(), - sled_agent, - dropshot_log, - ) - .config(dropshot_config) - .version_policy(dropshot::VersionPolicy::Dynamic(Box::new( - dropshot::ClientSpecifiesVersionInHeader::new( - omicron_common::api::VERSION_HEADER, - sled_agent_api::VERSION_ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY, - ), - ))) - .start() - .map_err(|error| format!("initializing server: {}", error))?; + let http_server = + dropshot::ServerBuilder::new(http_api(), sled_agent, dropshot_log) + .config(dropshot_config) + .version_policy(dropshot::VersionPolicy::Dynamic(Box::new( + dropshot::ClientSpecifiesVersionInHeader::new( + omicron_common::api::VERSION_HEADER, + sled_agent_api::VERSION_NEWTYPE_UUID_BUMP, + ), + ))) + .start() + .map_err(|error| format!("initializing server: {}", error))?; Ok(Server { http_server }) } From 189709d41c177b917ace9f7dfbbba0fbd7a067d0 Mon Sep 17 00:00:00 2001 From: Rain Date: Wed, 1 Oct 2025 22:27:03 +0000 Subject: [PATCH 3/3] more updates Created using spr 1.3.6-beta.1 --- schema/start-sled-agent-request.json | 15 ++++++++++----- sled-agent/src/sim/server.rs | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/schema/start-sled-agent-request.json b/schema/start-sled-agent-request.json index 1b5d3aab7fd..4058fb40514 100644 --- a/schema/start-sled-agent-request.json +++ b/schema/start-sled-agent-request.json @@ -51,6 +51,15 @@ } } }, + "SledUuid": { + "type": "string", + "format": "uuid", + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::SledUuid", + "version": "*" + } + }, "StartSledAgentRequestBody": { "description": "This is the actual app level data of `StartSledAgentRequest`\n\nWe nest it below the \"header\" of `generation` and `schema_version` so that we can perform partial deserialization of `EarlyNetworkConfig` to only read the header and defer deserialization of the body once we know the schema version. This is possible via the use of [`serde_json::value::RawValue`] in future (post-v1) deserialization paths.", "type": "object", @@ -66,7 +75,7 @@ "description": "Uuid of the Sled Agent to be created.", "allOf": [ { - "$ref": "#/definitions/TypedUuidForSledKind" + "$ref": "#/definitions/SledUuid" } ] }, @@ -92,10 +101,6 @@ "type": "boolean" } } - }, - "TypedUuidForSledKind": { - "type": "string", - "format": "uuid" } } } \ No newline at end of file diff --git a/sled-agent/src/sim/server.rs b/sled-agent/src/sim/server.rs index b0c65ba3e87..5c4e8482036 100644 --- a/sled-agent/src/sim/server.rs +++ b/sled-agent/src/sim/server.rs @@ -123,7 +123,7 @@ impl Server { .version_policy(dropshot::VersionPolicy::Dynamic(Box::new( dropshot::ClientSpecifiesVersionInHeader::new( omicron_common::api::VERSION_HEADER, - sled_agent_api::VERSION_ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY, + sled_agent_api::VERSION_NEWTYPE_UUID_BUMP, ), ))) .start()