From 34a5fd8ffd088b7219e502d67cff4af7549a9e02 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Aug 2026 21:31:26 +0000 Subject: [PATCH 01/34] remove up to sled-agent api version 3 --- .../src/test_util/host_phase_2_test_state.rs | 17 ------ .../sled-agent-1.0.0-2da304.json.gitstub | 1 - .../sled-agent-2.0.0-a3e161.json.gitstub | 1 - sled-agent/api/src/lib.rs | 34 ------------ sled-agent/src/http_entrypoints.rs | 53 ------------------- sled-agent/src/sim/http_entrypoints.rs | 16 ------ .../types/versions/src/initial/debug.rs | 18 ------- sled-agent/types/versions/src/initial/mod.rs | 1 - sled-agent/types/versions/src/latest.rs | 2 - 9 files changed, 143 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-1.0.0-2da304.json.gitstub delete mode 100644 openapi/sled-agent/sled-agent-2.0.0-a3e161.json.gitstub delete mode 100644 sled-agent/types/versions/src/initial/debug.rs diff --git a/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs b/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs index 4df57e21773..2bd9b306d14 100644 --- a/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs +++ b/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs @@ -218,7 +218,6 @@ mod api_impl { use sled_agent_types::bootstore::BootstoreStatus; use sled_agent_types::dataset::LocalStorageDatasetDeleteRequest; use sled_agent_types::dataset::LocalStorageDatasetEnsureRequest; - use sled_agent_types::debug::ChickenSwitchDestroyOrphanedDatasets; use sled_agent_types::debug::OperatorSwitchZonePolicy; use sled_agent_types::diagnostics::SledDiagnosticsLogsDownloadPathParm; use sled_agent_types::diagnostics::SledDiagnosticsLogsDownloadQueryParam; @@ -972,22 +971,6 @@ mod api_impl { unimplemented!() } - async fn chicken_switch_destroy_orphaned_datasets_get_v1( - _request_context: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - > { - unimplemented!() - } - - async fn chicken_switch_destroy_orphaned_datasets_put_v1( - _request_context: RequestContext, - _body: TypedBody, - ) -> Result { - unimplemented!() - } - async fn debug_operator_switch_zone_policy_get( _request_context: RequestContext, ) -> Result, HttpError> diff --git a/openapi/sled-agent/sled-agent-1.0.0-2da304.json.gitstub b/openapi/sled-agent/sled-agent-1.0.0-2da304.json.gitstub deleted file mode 100644 index 5c0d7afef1c..00000000000 --- a/openapi/sled-agent/sled-agent-1.0.0-2da304.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -a582b520e5926304437d844dd68dcb03dd1d04cf:openapi/sled-agent/sled-agent-1.0.0-2da304.json diff --git a/openapi/sled-agent/sled-agent-2.0.0-a3e161.json.gitstub b/openapi/sled-agent/sled-agent-2.0.0-a3e161.json.gitstub deleted file mode 100644 index 82c35ef97f0..00000000000 --- a/openapi/sled-agent/sled-agent-2.0.0-a3e161.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -33d4f825192acc9d0425b5eac6ea7624ecc0da84:openapi/sled-agent/sled-agent-2.0.0-a3e161.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index b2b36984d11..824c541e559 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -87,8 +87,6 @@ api_versions!([ (5, NEWTYPE_UUID_BUMP), (4, ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY), (3, ADD_SWITCH_ZONE_OPERATOR_POLICY), - (2, REMOVE_DESTROY_ORPHANED_DATASETS_CHICKEN_SWITCH), - (1, INITIAL), ]); // WHEN CHANGING THE API (part 2 of 2): @@ -1582,38 +1580,6 @@ pub trait SledAgentApi { >, ) -> Result, HttpError>; - /// This endpoint reports the status of the `destroy_orphaned_datasets` - /// chicken switch. It will be removed with omicron#6177. - #[endpoint { - operation_id = "chicken_switch_destroy_orphaned_datasets_get", - method = GET, - path = "/chicken-switch/destroy-orphaned-datasets", - versions = ..VERSION_REMOVE_DESTROY_ORPHANED_DATASETS_CHICKEN_SWITCH, - }] - async fn chicken_switch_destroy_orphaned_datasets_get_v1( - request_context: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - >; - - /// This endpoint sets the `destroy_orphaned_datasets` chicken switch - /// (allowing sled-agent to delete datasets it believes are orphaned). It - /// will be removed with omicron#6177. - #[endpoint { - operation_id = "chicken_switch_destroy_orphaned_datasets_put", - method = PUT, - path = "/chicken-switch/destroy-orphaned-datasets", - // This should have been removed in - // `VERSION_REMOVE_DESTROY_ORPHANED_DATASETS_CHICKEN_SWITCH`, but was - // overlooked. This removes it as of the next version instead. - versions = ..VERSION_ADD_SWITCH_ZONE_OPERATOR_POLICY, - }] - async fn chicken_switch_destroy_orphaned_datasets_put_v1( - request_context: RequestContext, - body: TypedBody, - ) -> Result; - /// A debugging endpoint only used by `omdb` that allows us to test /// restarting the switch zone without restarting sled-agent. See /// for context. diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index e9752232a91..02db2964c08 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -1522,59 +1522,6 @@ impl SledAgentApi for SledAgentImpl { .await } - async fn chicken_switch_destroy_orphaned_datasets_get_v1( - request_context: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - > { - let sa = request_context.context(); - sa.latencies() - .instrument_dropshot_handler(&request_context, async { - // This API has been removed, but we still provide an endpoint for - // backwards compatibility. Only `omdb` ever called this endpoint, so we - // could probably just always return an error, but we can at least - // attempt to do something reasonable. We've removed this chicken switch - // and always attempt to destroy orphans, so we can just claim the - // chicken switch is always in that state. - let destroy_orphans = true; - Ok(HttpResponseOk( - v1::debug::ChickenSwitchDestroyOrphanedDatasets { - destroy_orphans, - }, - )) - }) - .await - } - - async fn chicken_switch_destroy_orphaned_datasets_put_v1( - request_context: RequestContext, - body: TypedBody, - ) -> Result { - let sa = request_context.context(); - let v1::debug::ChickenSwitchDestroyOrphanedDatasets { destroy_orphans } = - body.into_inner(); - sa.latencies() - .instrument_dropshot_handler(&request_context, async { - // This API has been removed, but we still provide an endpoint for - // backwards compatibility. Only `omdb` ever called this endpoint, so we - // could probably just always return an error, but we can at least - // attempt to do something reasonable. We've removed this chicken switch - // and always attempt to destroy orphans, so we can treat requests to - // destroy orphans as successful and attempts to disable it as an error. - if destroy_orphans { - Ok(HttpResponseUpdatedNoContent()) - } else { - Err(HttpError::for_bad_request( - None, - "orphaned dataset destruction can no longer be disabled" - .to_string(), - )) - } - }) - .await - } - async fn debug_operator_switch_zone_policy_get( request_context: RequestContext, ) -> Result, HttpError> { diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index 1d513c37e4a..3aafbfcf75b 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -1070,22 +1070,6 @@ impl SledAgentApi for SledAgentSimImpl { method_unimplemented() } - async fn chicken_switch_destroy_orphaned_datasets_get_v1( - _request_context: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - > { - method_unimplemented() - } - - async fn chicken_switch_destroy_orphaned_datasets_put_v1( - _request_context: RequestContext, - _body: TypedBody, - ) -> Result { - method_unimplemented() - } - async fn debug_operator_switch_zone_policy_get( _request_context: RequestContext, ) -> Result, HttpError> { diff --git a/sled-agent/types/versions/src/initial/debug.rs b/sled-agent/types/versions/src/initial/debug.rs deleted file mode 100644 index e5f03c08391..00000000000 --- a/sled-agent/types/versions/src/initial/debug.rs +++ /dev/null @@ -1,18 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -//! Debug/chicken-switch types for Sled Agent API v1. - -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -/// Chicken switch for orphaned dataset destruction. -/// -/// This type is used in both GET and PUT operations (in versions 1-2). -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct ChickenSwitchDestroyOrphanedDatasets { - /// If true, sled-agent will attempt to destroy durable ZFS datasets that it - /// believes were associated with now-expunged Omicron zones. - pub destroy_orphans: bool, -} diff --git a/sled-agent/types/versions/src/initial/mod.rs b/sled-agent/types/versions/src/initial/mod.rs index f1d1d7e007a..65f47e8bcb7 100644 --- a/sled-agent/types/versions/src/initial/mod.rs +++ b/sled-agent/types/versions/src/initial/mod.rs @@ -6,7 +6,6 @@ pub mod artifact; pub mod bootstore; -pub mod debug; pub mod diagnostics; pub mod disk; pub mod early_networking; diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index e4be929b2e4..703b5fb035c 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -33,8 +33,6 @@ pub mod dataset { } pub mod debug { - pub use crate::v1::debug::ChickenSwitchDestroyOrphanedDatasets; - pub use crate::v3::debug::OperatorSwitchZonePolicy; } From 4c92e48edfe9e03992ee53e8cdfe1386f0a0d6e2 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Aug 2026 21:37:55 +0000 Subject: [PATCH 02/34] add retire comment --- sled-agent/api/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 824c541e559..45a52c1a97b 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -87,6 +87,8 @@ api_versions!([ (5, NEWTYPE_UUID_BUMP), (4, ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY), (3, ADD_SWITCH_ZONE_OPERATOR_POLICY), + // Versions before this have been retired. We no longer support in any + // server, nor expect it from any client. ]); // WHEN CHANGING THE API (part 2 of 2): From b9a8171682aa6e00c212ba46d0c816c4d59c51c0 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Aug 2026 21:52:04 +0000 Subject: [PATCH 03/34] remove up to sled-agent api version 4 --- openapi/sled-agent/sled-agent-3.0.0-f44f77.json.gitstub | 1 - openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub | 1 + ...agent-50.0.0-240307.json => sled-agent-51.0.0-f0475d.json} | 2 +- openapi/sled-agent/sled-agent-latest.json | 2 +- sled-agent/api/src/lib.rs | 4 +--- sled-agent/types/versions/src/latest.rs | 2 +- sled-agent/types/versions/src/lib.rs | 4 ++-- .../debug.rs | 0 .../mod.rs | 4 +--- 9 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-3.0.0-f44f77.json.gitstub create mode 100644 openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub rename openapi/sled-agent/{sled-agent-50.0.0-240307.json => sled-agent-51.0.0-f0475d.json} (99%) rename sled-agent/types/versions/src/{add_switch_zone_operator_policy => retire_up_to_version_23}/debug.rs (100%) rename sled-agent/types/versions/src/{add_switch_zone_operator_policy => retire_up_to_version_23}/mod.rs (60%) diff --git a/openapi/sled-agent/sled-agent-3.0.0-f44f77.json.gitstub b/openapi/sled-agent/sled-agent-3.0.0-f44f77.json.gitstub deleted file mode 100644 index e5b59c151c4..00000000000 --- a/openapi/sled-agent/sled-agent-3.0.0-f44f77.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -4f5153721993b7f2a96e48f49ef0b42144deff32:openapi/sled-agent/sled-agent-3.0.0-f44f77.json diff --git a/openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub b/openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub new file mode 100644 index 00000000000..7d70606306e --- /dev/null +++ b/openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub @@ -0,0 +1 @@ +5c5a6b98a96b2106757efec1aee87afdabeb1f71:openapi/sled-agent/sled-agent-50.0.0-240307.json diff --git a/openapi/sled-agent/sled-agent-50.0.0-240307.json b/openapi/sled-agent/sled-agent-51.0.0-f0475d.json similarity index 99% rename from openapi/sled-agent/sled-agent-50.0.0-240307.json rename to openapi/sled-agent/sled-agent-51.0.0-f0475d.json index 61817695b64..f1c43871ff8 100644 --- a/openapi/sled-agent/sled-agent-50.0.0-240307.json +++ b/openapi/sled-agent/sled-agent-51.0.0-f0475d.json @@ -7,7 +7,7 @@ "url": "https://oxide.computer", "email": "api@oxide.computer" }, - "version": "50.0.0" + "version": "51.0.0" }, "paths": { "/artifacts": { diff --git a/openapi/sled-agent/sled-agent-latest.json b/openapi/sled-agent/sled-agent-latest.json index 21b3d0bb47f..b66905d4184 120000 --- a/openapi/sled-agent/sled-agent-latest.json +++ b/openapi/sled-agent/sled-agent-latest.json @@ -1 +1 @@ -sled-agent-50.0.0-240307.json \ No newline at end of file +sled-agent-51.0.0-f0475d.json \ No newline at end of file diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 45a52c1a97b..c39085cb78d 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -39,6 +39,7 @@ api_versions!([ // | example for the next person. // v // (next_int, IDENT), + (51, RETIRE_UP_TO_VERSION_23), (50, TYPED_SLED_CONFIG_GENERATION), (49, ADD_UPDATE_DISPOSITION), (48, ALLOW_DDM_TRAFFIC), @@ -86,7 +87,6 @@ api_versions!([ (6, ADD_PROBE_PUT_ENDPOINT), (5, NEWTYPE_UUID_BUMP), (4, ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY), - (3, ADD_SWITCH_ZONE_OPERATOR_POLICY), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -1588,7 +1588,6 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/debug/switch-zone-policy", - versions = VERSION_ADD_SWITCH_ZONE_OPERATOR_POLICY.., }] async fn debug_operator_switch_zone_policy_get( request_context: RequestContext, @@ -1608,7 +1607,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/debug/switch-zone-policy", - versions = VERSION_ADD_SWITCH_ZONE_OPERATOR_POLICY.., }] async fn debug_operator_switch_zone_policy_put( request_context: RequestContext, diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index 703b5fb035c..c310a02375f 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -33,7 +33,7 @@ pub mod dataset { } pub mod debug { - pub use crate::v3::debug::OperatorSwitchZonePolicy; + pub use crate::v51::debug::OperatorSwitchZonePolicy; } pub mod diagnostics { diff --git a/sled-agent/types/versions/src/lib.rs b/sled-agent/types/versions/src/lib.rs index 3f3b3982494..b23f0e68d47 100644 --- a/sled-agent/types/versions/src/lib.rs +++ b/sled-agent/types/versions/src/lib.rs @@ -67,8 +67,6 @@ pub mod v26; pub mod v28; #[path = "add_vsock_component/mod.rs"] pub mod v29; -#[path = "add_switch_zone_operator_policy/mod.rs"] -pub mod v3; #[path = "stronger_bgp_unnumbered_types/mod.rs"] pub mod v30; #[path = "add_icmpv6_firewall_support/mod.rs"] @@ -105,6 +103,8 @@ pub mod v48; pub mod v49; #[path = "typed_sled_config_generation/mod.rs"] pub mod v50; +#[path = "retire_up_to_version_23/mod.rs"] +pub mod v51; #[path = "add_probe_put_endpoint/mod.rs"] pub mod v6; #[path = "multicast_support/mod.rs"] diff --git a/sled-agent/types/versions/src/add_switch_zone_operator_policy/debug.rs b/sled-agent/types/versions/src/retire_up_to_version_23/debug.rs similarity index 100% rename from sled-agent/types/versions/src/add_switch_zone_operator_policy/debug.rs rename to sled-agent/types/versions/src/retire_up_to_version_23/debug.rs diff --git a/sled-agent/types/versions/src/add_switch_zone_operator_policy/mod.rs b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs similarity index 60% rename from sled-agent/types/versions/src/add_switch_zone_operator_policy/mod.rs rename to sled-agent/types/versions/src/retire_up_to_version_23/mod.rs index 9fc959ca481..fd372706bd0 100644 --- a/sled-agent/types/versions/src/add_switch_zone_operator_policy/mod.rs +++ b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs @@ -2,8 +2,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -//! Version `ADD_SWITCH_ZONE_OPERATOR_POLICY` of the Sled Agent API. -//! -//! This version added the operator switch zone policy debug endpoint. +//! Version `RETIRE_UP_TO_VERSION_23` of the Sled Agent API. pub mod debug; From c3394b3c884d9f32eabecd31460efbfb93b20d19 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Aug 2026 22:11:42 +0000 Subject: [PATCH 04/34] remove up to sled-agent api version 5 --- .../sled-agent-4.0.0-fd6727.json.gitstub | 1 - sled-agent/api/src/lib.rs | 34 +------- .../inventory.rs | 86 ------------------- 3 files changed, 2 insertions(+), 119 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-4.0.0-fd6727.json.gitstub diff --git a/openapi/sled-agent/sled-agent-4.0.0-fd6727.json.gitstub b/openapi/sled-agent/sled-agent-4.0.0-fd6727.json.gitstub deleted file mode 100644 index 770102e3b6c..00000000000 --- a/openapi/sled-agent/sled-agent-4.0.0-fd6727.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -e76962a5f67b8c5bf813ee24a7600634de708b35:openapi/sled-agent/sled-agent-4.0.0-fd6727.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index c39085cb78d..369a7190d3c 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -86,7 +86,6 @@ api_versions!([ (7, MULTICAST_SUPPORT), (6, ADD_PROBE_PUT_ENDPOINT), (5, NEWTYPE_UUID_BUMP), - (4, ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -443,7 +442,7 @@ pub trait SledAgentApi { method = PUT, path = "/omicron-config", versions = - VERSION_ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, + ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, }] async fn omicron_config_put_v4( rqctx: RequestContext, @@ -453,19 +452,6 @@ pub trait SledAgentApi { Self::omicron_config_put_v10(rqctx, body).await } - #[endpoint { - operation_id = "omicron_config_put", - method = PUT, - path = "/omicron-config", - versions = ..VERSION_ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY, - }] - async fn omicron_config_put_v1( - rqctx: RequestContext, - body: TypedBody, - ) -> Result { - Self::omicron_config_put_v4(rqctx, body.map(Into::into)).await - } - #[endpoint { operation_id = "sled_role_get", method = GET, @@ -1405,8 +1391,7 @@ pub trait SledAgentApi { operation_id = "inventory", method = GET, path = "/inventory", - versions = - VERSION_ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, + versions = ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, }] async fn inventory_v4( rqctx: RequestContext, @@ -1415,21 +1400,6 @@ pub trait SledAgentApi { inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) } - /// Fetch basic information about this sled - #[endpoint { - operation_id = "inventory", - method = GET, - path = "/inventory", - versions = ..VERSION_ADD_NEXUS_LOCKSTEP_PORT_TO_INVENTORY, - }] - async fn inventory_v1( - rqctx: RequestContext, - ) -> Result, HttpError> { - Self::inventory_v4(rqctx).await.map(|HttpResponseOk(inv)| { - HttpResponseOk(v1::inventory::Inventory::from(inv)) - }) - } - /// Fetch sled identifiers #[endpoint { method = GET, diff --git a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs index 432947b52d1..83a0f1dcf05 100644 --- a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs @@ -285,19 +285,6 @@ pub struct OmicronZonesConfig { pub zones: Vec, } -impl From for OmicronSledConfig { - fn from(value: v1::inventory::OmicronSledConfig) -> Self { - Self { - generation: value.generation, - disks: value.disks, - datasets: value.datasets, - zones: value.zones.into_iter().map(Into::into).collect(), - remove_mupdate_override: value.remove_mupdate_override, - host_phase_2: value.host_phase_2, - } - } -} - impl From for OmicronZoneConfig { fn from(value: v1::inventory::OmicronZoneConfig) -> Self { Self { @@ -391,41 +378,6 @@ impl From for OmicronZoneType { } } -impl From for v1::inventory::Inventory { - fn from(value: Inventory) -> Self { - Self { - sled_id: value.sled_id, - sled_agent_address: value.sled_agent_address, - sled_role: value.sled_role, - baseboard: value.baseboard, - usable_hardware_threads: value.usable_hardware_threads, - usable_physical_ram: value.usable_physical_ram, - cpu_family: value.cpu_family, - reservoir_size: value.reservoir_size, - disks: value.disks, - zpools: value.zpools, - datasets: value.datasets, - ledgered_sled_config: value.ledgered_sled_config.map(Into::into), - reconciler_status: value.reconciler_status.into(), - last_reconciliation: value.last_reconciliation.map(Into::into), - zone_image_resolver: value.zone_image_resolver, - } - } -} - -impl From for v1::inventory::OmicronSledConfig { - fn from(value: OmicronSledConfig) -> Self { - Self { - generation: value.generation, - disks: value.disks, - datasets: value.datasets, - zones: value.zones.into_iter().map(Into::into).collect(), - remove_mupdate_override: value.remove_mupdate_override, - host_phase_2: value.host_phase_2, - } - } -} - impl From for v1::inventory::OmicronZoneConfig { fn from(value: OmicronZoneConfig) -> Self { Self { @@ -513,41 +465,3 @@ impl From for v1::inventory::OmicronZoneType { } } } - -impl From - for v1::inventory::ConfigReconcilerInventory -{ - fn from(value: ConfigReconcilerInventory) -> Self { - Self { - last_reconciled_config: value.last_reconciled_config.into(), - external_disks: value.external_disks, - datasets: value.datasets, - orphaned_datasets: value.orphaned_datasets, - zones: value.zones, - boot_partitions: value.boot_partitions, - remove_mupdate_override: value.remove_mupdate_override, - } - } -} - -impl From - for v1::inventory::ConfigReconcilerInventoryStatus -{ - fn from(value: ConfigReconcilerInventoryStatus) -> Self { - match value { - ConfigReconcilerInventoryStatus::NotYetRun => Self::NotYetRun, - ConfigReconcilerInventoryStatus::Running { - config, - started_at, - running_for, - } => Self::Running { - config: Box::new((*config).into()), - started_at, - running_for, - }, - ConfigReconcilerInventoryStatus::Idle { completed_at, ran_for } => { - Self::Idle { completed_at, ran_for } - } - } - } -} From a5343ad0073531d88a5ec76bcd9a2bb4633f2616 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Aug 2026 22:13:00 +0000 Subject: [PATCH 05/34] remove up to sled-agent api version 6 --- openapi/sled-agent/sled-agent-5.0.0-253577.json.gitstub | 1 - sled-agent/api/src/lib.rs | 1 - 2 files changed, 2 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-5.0.0-253577.json.gitstub diff --git a/openapi/sled-agent/sled-agent-5.0.0-253577.json.gitstub b/openapi/sled-agent/sled-agent-5.0.0-253577.json.gitstub deleted file mode 100644 index 0927193e0b7..00000000000 --- a/openapi/sled-agent/sled-agent-5.0.0-253577.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -4d5bdc6d348b27761348d763c4085f060bcefc18:openapi/sled-agent/sled-agent-5.0.0-253577.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 369a7190d3c..4a967bc2bee 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -85,7 +85,6 @@ api_versions!([ (8, REMOVE_SLED_ROLE), (7, MULTICAST_SUPPORT), (6, ADD_PROBE_PUT_ENDPOINT), - (5, NEWTYPE_UUID_BUMP), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); From 9da9ced38f0ad1c8a7180594118010e98b106ca8 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Aug 2026 22:16:19 +0000 Subject: [PATCH 06/34] remove up to sled-agent api version 7 --- openapi/sled-agent/sled-agent-6.0.0-d37dd7.json.gitstub | 1 - sled-agent/api/src/lib.rs | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-6.0.0-d37dd7.json.gitstub diff --git a/openapi/sled-agent/sled-agent-6.0.0-d37dd7.json.gitstub b/openapi/sled-agent/sled-agent-6.0.0-d37dd7.json.gitstub deleted file mode 100644 index 0366fa5a446..00000000000 --- a/openapi/sled-agent/sled-agent-6.0.0-d37dd7.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -c009adbad528a212beb85212b2c509768f594aa8:openapi/sled-agent/sled-agent-6.0.0-d37dd7.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 4a967bc2bee..84f47fddb46 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -84,7 +84,6 @@ api_versions!([ (9, DELEGATE_ZVOL_TO_PROPOLIS), (8, REMOVE_SLED_ROLE), (7, MULTICAST_SUPPORT), - (6, ADD_PROBE_PUT_ENDPOINT), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -1606,8 +1605,7 @@ pub trait SledAgentApi { operation_id = "probes_put", method = PUT, path = "/probes", - versions = - VERSION_ADD_PROBE_PUT_ENDPOINT..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, + versions = ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, }] async fn probes_put_v6( request_context: RequestContext, From 7db1479e9ab42c803bc7386d533ffc19647943d6 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Aug 2026 22:24:56 +0000 Subject: [PATCH 07/34] remove up to sled-agent api version 8 --- .../sled-agent-7.0.0-62acb3.json.gitstub | 1 - sled-agent/api/src/lib.rs | 25 ++---------- sled-agent/src/fakes/nexus.rs | 2 +- .../types/versions/src/initial/instance.rs | 38 +------------------ sled-agent/types/versions/src/latest.rs | 2 +- .../src/multicast_support/instance.rs | 14 ------- .../src/retire_up_to_version_23/instance.rs | 14 +++++++ .../src/retire_up_to_version_23/mod.rs | 4 ++ 8 files changed, 25 insertions(+), 75 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-7.0.0-62acb3.json.gitstub create mode 100644 sled-agent/types/versions/src/retire_up_to_version_23/instance.rs diff --git a/openapi/sled-agent/sled-agent-7.0.0-62acb3.json.gitstub b/openapi/sled-agent/sled-agent-7.0.0-62acb3.json.gitstub deleted file mode 100644 index b1a3d4745e7..00000000000 --- a/openapi/sled-agent/sled-agent-7.0.0-62acb3.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -18058fcad61863324e3be38f17001ed5760d1458:openapi/sled-agent/sled-agent-7.0.0-62acb3.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 84f47fddb46..e53fe579ee1 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -83,7 +83,6 @@ api_versions!([ (10, ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES), (9, DELEGATE_ZVOL_TO_PROPOLIS), (8, REMOVE_SLED_ROLE), - (7, MULTICAST_SUPPORT), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -581,7 +580,7 @@ pub trait SledAgentApi { }] async fn vmm_register_v10( rqctx: RequestContext, - path_params: Path, + path_params: Path, body: TypedBody, ) -> Result, HttpError> { let body = body.try_map(v11::instance::InstanceEnsureBody::try_from)?; @@ -597,7 +596,7 @@ pub trait SledAgentApi { }] async fn vmm_register_v9( rqctx: RequestContext, - path_params: Path, + path_params: Path, body: TypedBody, ) -> Result, HttpError> { let body = body.try_map(v10::instance::InstanceEnsureBody::try_from)?; @@ -608,30 +607,16 @@ pub trait SledAgentApi { operation_id = "vmm_register", method = PUT, path = "/vmms/{propolis_id}", - versions = VERSION_MULTICAST_SUPPORT..VERSION_DELEGATE_ZVOL_TO_PROPOLIS + versions = ..VERSION_DELEGATE_ZVOL_TO_PROPOLIS }] async fn vmm_register_v7( rqctx: RequestContext, - path_params: Path, + path_params: Path, body: TypedBody, ) -> Result, HttpError> { Self::vmm_register_v9(rqctx, path_params, body.map(Into::into)).await } - #[endpoint { - operation_id = "vmm_register", - method = PUT, - path = "/vmms/{propolis_id}", - versions = ..VERSION_MULTICAST_SUPPORT - }] - async fn vmm_register_v1( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - Self::vmm_register_v7(rqctx, path_params, body.map(Into::into)).await - } - #[endpoint { method = DELETE, path = "/vmms/{propolis_id}" @@ -686,7 +671,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/vmms/{propolis_id}/multicast-group", - versions = VERSION_MULTICAST_SUPPORT.., }] async fn vmm_join_multicast_group( rqctx: RequestContext, @@ -697,7 +681,6 @@ pub trait SledAgentApi { #[endpoint { method = DELETE, path = "/vmms/{propolis_id}/multicast-group", - versions = VERSION_MULTICAST_SUPPORT.., }] async fn vmm_leave_multicast_group( rqctx: RequestContext, diff --git a/sled-agent/src/fakes/nexus.rs b/sled-agent/src/fakes/nexus.rs index d267fda213c..0e747485f1b 100644 --- a/sled-agent/src/fakes/nexus.rs +++ b/sled-agent/src/fakes/nexus.rs @@ -19,7 +19,7 @@ use omicron_uuid_kinds::{OmicronZoneUuid, PropolisUuid, SledUuid}; use schemars::JsonSchema; use serde::Deserialize; use sled_agent_types_versions::v1::instance::SledVmmState; -use sled_agent_types_versions::v1::instance::VmmPathParam; +use sled_agent_types::instance::VmmPathParam; use transient_dns_server::TransientDnsServer; /// Implements a fake Nexus. diff --git a/sled-agent/types/versions/src/initial/instance.rs b/sled-agent/types/versions/src/initial/instance.rs index 569485070a1..e989fa6028c 100644 --- a/sled-agent/types/versions/src/initial/instance.rs +++ b/sled-agent/types/versions/src/initial/instance.rs @@ -13,7 +13,7 @@ use omicron_common::api::external::Hostname; use omicron_common::api::internal::nexus::HostIdentifier; use omicron_common::api::internal::shared::DhcpConfig; use omicron_generation_kinds::Generation; -use omicron_uuid_kinds::{InstanceUuid, PropolisUuid}; +use omicron_uuid_kinds::PropolisUuid; use propolis_api_types_versions::v1::instance_spec::InstanceSpec; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -22,12 +22,6 @@ use uuid::Uuid; use super::inventory::NetworkInterface; use super::inventory::SourceNatConfig; -/// Path parameters for VMM requests. -#[derive(Deserialize, JsonSchema)] -pub struct VmmPathParam { - pub propolis_id: PropolisUuid, -} - /// Path parameters for VMM disk snapshot requests. #[derive(Deserialize, JsonSchema)] pub struct VmmIssueDiskSnapshotRequestPathParam { @@ -141,36 +135,6 @@ pub enum MigrationState { Completed, } -/// The body of a request to ensure that a instance and VMM are known to a sled -/// agent. -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct InstanceEnsureBody { - /// The virtual hardware configuration this virtual machine should have when - /// it is started. - pub vmm_spec: VmmSpec, - - /// Information about the sled-local configuration that needs to be - /// established to make the VM's virtual hardware fully functional. - pub local_config: InstanceSledLocalConfig, - - /// The initial VMM runtime state for the VMM being registered. - pub vmm_runtime: VmmRuntimeState, - - /// The ID of the instance for which this VMM is being created. - pub instance_id: InstanceUuid, - - /// The ID of the migration in to this VMM, if this VMM is being - /// ensured is part of a migration in. If this is `None`, the VMM is not - /// being created due to a migration. - pub migration_id: Option, - - /// The address at which this VMM should serve a Propolis server API. - pub propolis_addr: SocketAddr, - - /// Metadata used to track instance statistics. - pub metadata: InstanceMetadata, -} - /// Describes sled-local configuration that a sled-agent must establish to make /// the instance's virtual hardware fully functional. #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index c310a02375f..8baba76ff66 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -111,7 +111,7 @@ pub mod instance { pub use crate::v1::instance::VmmIssueDiskSnapshotRequestBody; pub use crate::v1::instance::VmmIssueDiskSnapshotRequestPathParam; pub use crate::v1::instance::VmmIssueDiskSnapshotRequestResponse; - pub use crate::v1::instance::VmmPathParam; + pub use crate::v50::instance::VmmPathParam; pub use crate::v1::instance::VmmPutStateBody; pub use crate::v1::instance::VmmPutStateResponse; pub use crate::v1::instance::VmmRuntimeState; diff --git a/sled-agent/types/versions/src/multicast_support/instance.rs b/sled-agent/types/versions/src/multicast_support/instance.rs index e2b53839dd1..3437a27843d 100644 --- a/sled-agent/types/versions/src/multicast_support/instance.rs +++ b/sled-agent/types/versions/src/multicast_support/instance.rs @@ -79,20 +79,6 @@ pub struct InstanceMulticastMembership { pub sources: Vec, } -impl From for InstanceEnsureBody { - fn from(v1: v1::instance::InstanceEnsureBody) -> Self { - Self { - vmm_spec: v1.vmm_spec, - local_config: v1.local_config.into(), - vmm_runtime: v1.vmm_runtime, - instance_id: v1.instance_id, - migration_id: v1.migration_id, - propolis_addr: v1.propolis_addr, - metadata: v1.metadata, - } - } -} - impl From for InstanceSledLocalConfig { fn from(v1: v1::instance::InstanceSledLocalConfig) -> Self { Self { diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs b/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs new file mode 100644 index 00000000000..e30b4881c01 --- /dev/null +++ b/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs @@ -0,0 +1,14 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +use omicron_uuid_kinds::PropolisUuid; +use schemars::JsonSchema; +use serde::Deserialize; + +/// Path parameters for VMM requests. +#[derive(Deserialize, JsonSchema)] +pub struct VmmPathParam { + pub propolis_id: PropolisUuid, +} + diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs index fd372706bd0..bd9ee015fb1 100644 --- a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs +++ b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs @@ -4,4 +4,8 @@ //! Version `RETIRE_UP_TO_VERSION_23` of the Sled Agent API. +/// Types here were moved from retired versions because they were the latest +/// version of that type. + pub mod debug; +pub mod instance; From 0b8ea58832004d9c745a07d5af6093b74a532c01 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 00:32:14 +0000 Subject: [PATCH 08/34] remove up to sled-agent api version 9 --- .../sled-agent-8.0.0-0e6bcf.json.gitstub | 1 - sled-agent/api/src/lib.rs | 11 --------- sled-agent/src/http_entrypoints.rs | 11 --------- sled-agent/src/sim/http_entrypoints.rs | 6 ----- sled-agent/src/sled_agent.rs | 9 -------- .../inventory.rs | 3 ++- .../inventory.rs | 3 ++- .../src/add_fmd_to_inventory/inventory.rs | 2 +- .../src/add_health_monitor/inventory.rs | 2 +- .../inventory.rs | 3 ++- .../src/add_update_disposition/inventory.rs | 2 +- .../inventory.rs | 2 +- .../types/versions/src/initial/inventory.rs | 17 +------------- .../src/inventory_baseboard_id/inventory.rs | 2 +- sled-agent/types/versions/src/latest.rs | 2 +- .../measurement_proper_inventory/inventory.rs | 3 ++- .../versions/src/measurements/inventory.rs | 3 ++- .../modify_services_in_inventory/inventory.rs | 2 +- .../inventory.rs | 2 +- .../src/modify_svc_state_enum/inventory.rs | 2 +- .../src/modify_svcs_types/inventory.rs | 2 +- .../inventory.rs | 2 +- .../src/retire_up_to_version_23/inventory.rs | 23 +++++++++++++++++++ .../src/retire_up_to_version_23/mod.rs | 1 + 24 files changed, 46 insertions(+), 70 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-8.0.0-0e6bcf.json.gitstub create mode 100644 sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs diff --git a/openapi/sled-agent/sled-agent-8.0.0-0e6bcf.json.gitstub b/openapi/sled-agent/sled-agent-8.0.0-0e6bcf.json.gitstub deleted file mode 100644 index d7fbb306c88..00000000000 --- a/openapi/sled-agent/sled-agent-8.0.0-0e6bcf.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -73fa6628a393118f927264586d15069b201ba4b7:openapi/sled-agent/sled-agent-8.0.0-0e6bcf.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index e53fe579ee1..e5e2d11da2d 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -82,7 +82,6 @@ api_versions!([ (11, ADD_DUAL_STACK_EXTERNAL_IP_CONFIG), (10, ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES), (9, DELEGATE_ZVOL_TO_PROPOLIS), - (8, REMOVE_SLED_ROLE), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -449,16 +448,6 @@ pub trait SledAgentApi { Self::omicron_config_put_v10(rqctx, body).await } - #[endpoint { - operation_id = "sled_role_get", - method = GET, - path = "/sled-role", - versions = ..VERSION_REMOVE_SLED_ROLE, - }] - async fn sled_role_get_v1( - rqctx: RequestContext, - ) -> Result, HttpError>; - #[endpoint { operation_id = "vmm_register", method = PUT, diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index 02db2964c08..6529d71c94d 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -604,17 +604,6 @@ impl SledAgentApi for SledAgentImpl { .await } - async fn sled_role_get_v1( - rqctx: RequestContext, - ) -> Result, HttpError> { - let sa = rqctx.context(); - sa.latencies() - .instrument_dropshot_handler(&rqctx, async { - Ok(HttpResponseOk(sa.get_role())) - }) - .await - } - async fn vmm_register( rqctx: RequestContext, path_params: Path, diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index 3aafbfcf75b..802aeee45f4 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -971,12 +971,6 @@ impl SledAgentApi for SledAgentSimImpl { method_unimplemented() } - async fn sled_role_get_v1( - _rqctx: RequestContext, - ) -> Result, HttpError> { - method_unimplemented() - } - async fn sled_identifiers( _rqctx: RequestContext, ) -> Result, HttpError> { diff --git a/sled-agent/src/sled_agent.rs b/sled-agent/src/sled_agent.rs index f354b6835a6..eddacb3ba91 100644 --- a/sled-agent/src/sled_agent.rs +++ b/sled-agent/src/sled_agent.rs @@ -1049,15 +1049,6 @@ impl SledAgent { self.inner.config_reconciler.set_sled_config(config).await } - /// Returns whether or not the sled believes itself to be a scrimlet - pub fn get_role(&self) -> SledRole { - if self.inner.hardware.is_scrimlet() { - SledRole::Scrimlet - } else { - SledRole::Gimlet - } - } - /// Idempotently ensures that a given instance is registered with this sled, /// i.e., that it can be addressed by future calls to /// [`Self::instance_ensure_state`]. diff --git a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs index 589338430f9..1db4c847fe6 100644 --- a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs +++ b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs @@ -31,8 +31,9 @@ use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, OmicronZoneDataset, OmicronZoneImageSource, OrphanedDataset, - RemoveMupdateOverrideInventory, SledRole, ZoneImageResolverInventory, + RemoveMupdateOverrideInventory, ZoneImageResolverInventory, }; +use crate::v50::inventory::SledRole; use crate::v10; use crate::v10::inventory::NetworkInterface; use sled_hardware_types::SledCpuFamily; diff --git a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs index 7b4aea3b060..4808468a3a7 100644 --- a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs +++ b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs @@ -35,10 +35,11 @@ use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, NetworkInterfaceKind, OmicronZoneDataset, OmicronZoneImageSource, - OrphanedDataset, RemoveMupdateOverrideInventory, SledRole, SourceNatConfig, + OrphanedDataset, RemoveMupdateOverrideInventory, SourceNatConfig, ZoneImageResolverInventory, }; use crate::v4; +use crate::v50::inventory::SledRole; /// Identity and basic status information about this sled agent #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs index df872a67bcb..271bae8395b 100644 --- a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs @@ -15,7 +15,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::Baseboard; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; diff --git a/sled-agent/types/versions/src/add_health_monitor/inventory.rs b/sled-agent/types/versions/src/add_health_monitor/inventory.rs index 4a0aeee9c74..c6b8b3c222b 100644 --- a/sled-agent/types/versions/src/add_health_monitor/inventory.rs +++ b/sled-agent/types/versions/src/add_health_monitor/inventory.rs @@ -18,7 +18,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::InventoryZpool; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v1::inventory::ZoneImageResolverInventory; use crate::v11; pub use crate::v11::inventory::ConfigReconcilerInventory; diff --git a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs index 83a0f1dcf05..7f424f0a438 100644 --- a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs @@ -28,9 +28,10 @@ use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, NetworkInterface, OmicronZoneDataset, OmicronZoneImageSource, - OrphanedDataset, RemoveMupdateOverrideInventory, SledRole, SourceNatConfig, + OrphanedDataset, RemoveMupdateOverrideInventory, SourceNatConfig, ZoneImageResolverInventory, }; +use crate::v50::inventory::SledRole; use sled_hardware_types::SledCpuFamily; /// Identity and basic status information about this sled agent diff --git a/sled-agent/types/versions/src/add_update_disposition/inventory.rs b/sled-agent/types/versions/src/add_update_disposition/inventory.rs index d9e05cc9a2f..3eba814ecc9 100644 --- a/sled-agent/types/versions/src/add_update_disposition/inventory.rs +++ b/sled-agent/types/versions/src/add_update_disposition/inventory.rs @@ -22,7 +22,7 @@ use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::OrphanedDataset; use crate::v1::inventory::RemoveMupdateOverrideInventory; use crate::v1::inventory::SledCpuFamily; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v11::inventory::OmicronZoneConfig; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSingleMeasurement; diff --git a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs index 29b62d4a71e..a9bc3880a32 100644 --- a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs @@ -17,7 +17,7 @@ use std::net::SocketAddrV6; use crate::v1; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v12::inventory::SvcsInMaintenanceResult; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; diff --git a/sled-agent/types/versions/src/initial/inventory.rs b/sled-agent/types/versions/src/initial/inventory.rs index be69e280d52..edfa4835f5d 100644 --- a/sled-agent/types/versions/src/initial/inventory.rs +++ b/sled-agent/types/versions/src/initial/inventory.rs @@ -46,6 +46,7 @@ use super::disk::DiskVariant; use super::disk::M2Slot; use super::disk::OmicronPhysicalDiskConfig; use crate::impls::inventory::SourceNatConfigError; +use crate::v50::inventory::SledRole; /// Describes properties that should uniquely identify a Gimlet. /// @@ -143,22 +144,6 @@ pub struct InventoryDataset { pub compression: String, } -/// Describes the role of the sled within the rack. -/// -/// Note that this may change if the sled is physically moved -/// within the rack. -#[derive( - Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, -)] -#[serde(rename_all = "snake_case")] -pub enum SledRole { - /// The sled is a general compute sled. - Gimlet, - /// The sled is attached to the network switch, and has additional - /// responsibilities. - Scrimlet, -} - /// Describes the desired contents of a host phase 2 slot (i.e., the boot /// partition on one of the internal M.2 drives). #[derive( diff --git a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs index e20e8aa448a..0f33a52401b 100644 --- a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs +++ b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs @@ -15,7 +15,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::Baseboard; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index 8baba76ff66..718352fe76c 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -157,7 +157,7 @@ pub mod inventory { pub use crate::v1::inventory::RemoveMupdateOverrideBootSuccessInventory; pub use crate::v1::inventory::RemoveMupdateOverrideInventory; pub use crate::v1::inventory::SledCpuFamily; - pub use crate::v1::inventory::SledRole; + pub use crate::v50::inventory::SledRole; pub use crate::v1::inventory::ZoneArtifactInventory; pub use crate::v1::inventory::ZoneKind; diff --git a/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs b/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs index 472d692c201..f61521e6cae 100644 --- a/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs +++ b/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs @@ -22,8 +22,9 @@ use std::net::SocketAddrV6; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, InventoryDataset, InventoryDisk, InventoryZpool, OrphanedDataset, - RemoveMupdateOverrideInventory, SledRole, + RemoveMupdateOverrideInventory, }; +use crate::v50::inventory::SledRole; use crate::v14; use crate::v14::inventory::{ ConfigReconcilerInventoryStatus, HealthMonitorInventory, diff --git a/sled-agent/types/versions/src/measurements/inventory.rs b/sled-agent/types/versions/src/measurements/inventory.rs index 4624398a02c..94ded2e2f85 100644 --- a/sled-agent/types/versions/src/measurements/inventory.rs +++ b/sled-agent/types/versions/src/measurements/inventory.rs @@ -29,8 +29,9 @@ use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, ManifestInventory, MupdateOverrideInventory, OrphanedDataset, - RemoveMupdateOverrideInventory, SledRole, + RemoveMupdateOverrideInventory, }; +use crate::v50::inventory::SledRole; use crate::v11::inventory::OmicronZoneConfig; use crate::v12; pub use crate::v12::inventory::HealthMonitorInventory; diff --git a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs index 0cb3fb5fd09..8bed9e04b6b 100644 --- a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs +++ b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs @@ -15,7 +15,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; diff --git a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs index 3f807a1bcb6..79928a478ed 100644 --- a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs @@ -16,7 +16,7 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; diff --git a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs index 60ed469d9d1..fe90bcb83dd 100644 --- a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs @@ -18,7 +18,7 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; diff --git a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs index 0ab67537a1b..527e3fa27db 100644 --- a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs +++ b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs @@ -16,7 +16,7 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; diff --git a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs index 63febe95421..6741e540f86 100644 --- a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs +++ b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs @@ -16,7 +16,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::InventoryZpool; -use crate::v1::inventory::SledRole; +use crate::v50::inventory::SledRole; use crate::v12::inventory::SvcsInMaintenanceResult; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::HealthMonitorInventory; diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs b/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs new file mode 100644 index 00000000000..8fefa7ce938 --- /dev/null +++ b/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs @@ -0,0 +1,23 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +use serde::{Deserialize, Serialize}; +use schemars::JsonSchema; + +/// Describes the role of the sled within the rack. +/// +/// Note that this may change if the sled is physically moved +/// within the rack. +#[derive( + Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, +)] +#[serde(rename_all = "snake_case")] +pub enum SledRole { + /// The sled is a general compute sled. + Gimlet, + /// The sled is attached to the network switch, and has additional + /// responsibilities. + Scrimlet, +} + diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs index bd9ee015fb1..2af8f2e14f8 100644 --- a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs +++ b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs @@ -9,3 +9,4 @@ pub mod debug; pub mod instance; +pub mod inventory; From 7455e62e24ded14a95b610f190d5ccca55d4269c Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 01:02:01 +0000 Subject: [PATCH 09/34] remove up to sled-agent api version 10 --- .../sled-agent-9.0.0-12ab86.json.gitstub | 1 - sled-agent/api/src/lib.rs | 24 ++---------- .../src/delegate_zvol_to_propolis/instance.rs | 14 ------- .../src/multicast_support/instance.rs | 37 +------------------ 4 files changed, 5 insertions(+), 71 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-9.0.0-12ab86.json.gitstub diff --git a/openapi/sled-agent/sled-agent-9.0.0-12ab86.json.gitstub b/openapi/sled-agent/sled-agent-9.0.0-12ab86.json.gitstub deleted file mode 100644 index 8e5f55fd19c..00000000000 --- a/openapi/sled-agent/sled-agent-9.0.0-12ab86.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -f493515c1a1545cb71d6578d12055668a4198cb0:openapi/sled-agent/sled-agent-9.0.0-12ab86.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index e5e2d11da2d..0d341343a55 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -20,7 +20,7 @@ use omicron_common::api::internal::{ }, }; use sled_agent_types_versions::{ - latest, v1, v4, v6, v7, v9, v10, v11, v12, v14, v16, v17, v18, v20, v22, + latest, v1, v4, v6, v9, v10, v11, v12, v14, v16, v17, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; @@ -81,7 +81,6 @@ api_versions!([ (12, ADD_SMF_SERVICES_HEALTH_CHECK), (11, ADD_DUAL_STACK_EXTERNAL_IP_CONFIG), (10, ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES), - (9, DELEGATE_ZVOL_TO_PROPOLIS), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -580,8 +579,7 @@ pub trait SledAgentApi { method = PUT, path = "/vmms/{propolis_id}", operation_id = "vmm_register", - versions = - VERSION_DELEGATE_ZVOL_TO_PROPOLIS..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES + versions = ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES }] async fn vmm_register_v9( rqctx: RequestContext, @@ -592,20 +590,6 @@ pub trait SledAgentApi { Self::vmm_register_v10(rqctx, path_params, body).await } - #[endpoint { - operation_id = "vmm_register", - method = PUT, - path = "/vmms/{propolis_id}", - versions = ..VERSION_DELEGATE_ZVOL_TO_PROPOLIS - }] - async fn vmm_register_v7( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - Self::vmm_register_v9(rqctx, path_params, body.map(Into::into)).await - } - #[endpoint { method = DELETE, path = "/vmms/{propolis_id}" @@ -1604,7 +1588,7 @@ pub trait SledAgentApi { operation_id = "local_storage_dataset_ensure", method = POST, path = "/local-storage/{zpool_id}/{dataset_id}", - versions = VERSION_DELEGATE_ZVOL_TO_PROPOLIS..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL, + versions = ..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL, }] async fn local_storage_dataset_ensure_v9( request_context: RequestContext, @@ -1643,7 +1627,7 @@ pub trait SledAgentApi { operation_id = "local_storage_dataset_delete", method = DELETE, path = "/local-storage/{zpool_id}/{dataset_id}", - versions = VERSION_DELEGATE_ZVOL_TO_PROPOLIS..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL, + versions = ..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL, }] async fn local_storage_dataset_delete_v9( request_context: RequestContext, diff --git a/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs b/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs index d1cc7814b53..9799deaf58a 100644 --- a/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs +++ b/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs @@ -80,20 +80,6 @@ pub enum DelegatedZvol { LocalStorage { zpool_id: ExternalZpoolUuid, dataset_id: DatasetUuid }, } -impl From for InstanceEnsureBody { - fn from(v7: v7::instance::InstanceEnsureBody) -> Self { - Self { - vmm_spec: v7.vmm_spec, - local_config: v7.local_config.into(), - vmm_runtime: v7.vmm_runtime, - instance_id: v7.instance_id, - migration_id: v7.migration_id, - propolis_addr: v7.propolis_addr, - metadata: v7.metadata, - } - } -} - impl From for InstanceSledLocalConfig { fn from(v7: v7::instance::InstanceSledLocalConfig) -> Self { Self { diff --git a/sled-agent/types/versions/src/multicast_support/instance.rs b/sled-agent/types/versions/src/multicast_support/instance.rs index 3437a27843d..17e877b5643 100644 --- a/sled-agent/types/versions/src/multicast_support/instance.rs +++ b/sled-agent/types/versions/src/multicast_support/instance.rs @@ -2,53 +2,18 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use std::net::{IpAddr, SocketAddr}; +use std::net::IpAddr; use omicron_common::api::external::Hostname; use omicron_common::api::internal::shared::DhcpConfig; -use omicron_uuid_kinds::InstanceUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use uuid::Uuid; use crate::v1; -use crate::v1::instance::InstanceMetadata; use crate::v1::instance::ResolvedVpcFirewallRule; -use crate::v1::instance::VmmRuntimeState; -use crate::v1::instance::VmmSpec; use crate::v1::inventory::NetworkInterface; use crate::v1::inventory::SourceNatConfig; -/// The body of a request to ensure that a instance and VMM are known to a sled -/// agent. -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct InstanceEnsureBody { - /// The virtual hardware configuration this virtual machine should have when - /// it is started. - pub vmm_spec: VmmSpec, - - /// Information about the sled-local configuration that needs to be - /// established to make the VM's virtual hardware fully functional. - pub local_config: InstanceSledLocalConfig, - - /// The initial VMM runtime state for the VMM being registered. - pub vmm_runtime: VmmRuntimeState, - - /// The ID of the instance for which this VMM is being created. - pub instance_id: InstanceUuid, - - /// The ID of the migration in to this VMM, if this VMM is being - /// ensured is part of a migration in. If this is `None`, the VMM is not - /// being created due to a migration. - pub migration_id: Option, - - /// The address at which this VMM should serve a Propolis server API. - pub propolis_addr: SocketAddr, - - /// Metadata used to track instance statistics. - pub metadata: InstanceMetadata, -} - /// Describes sled-local configuration that a sled-agent must establish to make /// the instance's virtual hardware fully functional. /// From f16dbe975f08626dae01e3f79cf1dc66ac02ff91 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 14:00:55 +0000 Subject: [PATCH 10/34] remove up to sled-agent api version 11 --- .../sled-agent-10.0.0-898597.json.gitstub | 1 - sled-agent/api/src/lib.rs | 95 +------------------ .../firewall_rules.rs | 17 +--- .../firewall_rules.rs | 20 ---- .../instance.rs | 18 ---- .../probes.rs | 12 --- .../src/add_probe_put_endpoint/probes.rs | 8 -- .../firewall_rules.rs | 18 ---- .../src/delegate_zvol_to_propolis/instance.rs | 37 +------- .../src/delegate_zvol_to_propolis/mod.rs | 1 - 10 files changed, 7 insertions(+), 220 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-10.0.0-898597.json.gitstub delete mode 100644 sled-agent/types/versions/src/delegate_zvol_to_propolis/firewall_rules.rs diff --git a/openapi/sled-agent/sled-agent-10.0.0-898597.json.gitstub b/openapi/sled-agent/sled-agent-10.0.0-898597.json.gitstub deleted file mode 100644 index e062fa9e003..00000000000 --- a/openapi/sled-agent/sled-agent-10.0.0-898597.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -f062472edf65eb3d66179a9d8dfb66619f458c96:openapi/sled-agent/sled-agent-10.0.0-898597.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 0d341343a55..ba609fa7ac4 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -20,7 +20,7 @@ use omicron_common::api::internal::{ }, }; use sled_agent_types_versions::{ - latest, v1, v4, v6, v9, v10, v11, v12, v14, v16, v17, v18, v20, v22, + latest, v1, v9, v10, v11, v12, v14, v16, v17, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; @@ -80,7 +80,6 @@ api_versions!([ (13, ADD_TRUST_QUORUM), (12, ADD_SMF_SERVICES_HEALTH_CHECK), (11, ADD_DUAL_STACK_EXTERNAL_IP_CONFIG), - (10, ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -421,8 +420,7 @@ pub trait SledAgentApi { operation_id = "omicron_config_put", method = PUT, path = "/omicron-config", - versions = - VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG, + versions = ..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG, }] async fn omicron_config_put_v10( rqctx: RequestContext, @@ -432,21 +430,6 @@ pub trait SledAgentApi { Self::omicron_config_put_v11(rqctx, body).await } - #[endpoint { - operation_id = "omicron_config_put", - method = PUT, - path = "/omicron-config", - versions = - ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, - }] - async fn omicron_config_put_v4( - rqctx: RequestContext, - body: TypedBody, - ) -> Result { - let body = body.try_map(v10::inventory::OmicronSledConfig::try_from)?; - Self::omicron_config_put_v10(rqctx, body).await - } - #[endpoint { operation_id = "vmm_register", method = PUT, @@ -563,8 +546,7 @@ pub trait SledAgentApi { operation_id = "vmm_register", method = PUT, path = "/vmms/{propolis_id}", - versions = - VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG + versions = ..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG }] async fn vmm_register_v10( rqctx: RequestContext, @@ -575,21 +557,6 @@ pub trait SledAgentApi { Self::vmm_register_v11(rqctx, path_params, body).await } - #[endpoint { - method = PUT, - path = "/vmms/{propolis_id}", - operation_id = "vmm_register", - versions = ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES - }] - async fn vmm_register_v9( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - let body = body.try_map(v10::instance::InstanceEnsureBody::try_from)?; - Self::vmm_register_v10(rqctx, path_params, body).await - } - #[endpoint { method = DELETE, path = "/vmms/{propolis_id}" @@ -754,7 +721,7 @@ pub trait SledAgentApi { operation_id = "vpc_firewall_rules_put", method = PUT, path = "/vpc/{vpc_id}/firewall/rules", - versions = VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES..VERSION_ADD_ICMPV6_FIREWALL_SUPPORT, + versions = ..VERSION_ADD_ICMPV6_FIREWALL_SUPPORT, }] async fn vpc_firewall_rules_put_v11( rqctx: RequestContext, @@ -766,23 +733,6 @@ pub trait SledAgentApi { Self::vpc_firewall_rules_put(rqctx, path_params, body).await } - #[endpoint { - operation_id = "vpc_firewall_rules_put", - method = PUT, - path = "/vpc/{vpc_id}/firewall/rules", - versions = ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, - }] - async fn vpc_firewall_rules_put_v1( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result { - let body = body.try_map( - v11::firewall_rules::VpcFirewallRulesEnsureBody::try_from, - )?; - Self::vpc_firewall_rules_put_v11(rqctx, path_params, body).await - } - /// Create a mapping from a virtual NIC to a physical host // Keep interface_id to maintain parity with the simulated sled agent, which // requires interface_id on the path. @@ -1330,8 +1280,7 @@ pub trait SledAgentApi { operation_id = "inventory", method = GET, path = "/inventory", - versions = - VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG, + versions = ..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG, }] async fn inventory_v10( rqctx: RequestContext, @@ -1340,20 +1289,6 @@ pub trait SledAgentApi { inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) } - /// Fetch basic information about this sled - #[endpoint { - operation_id = "inventory", - method = GET, - path = "/inventory", - versions = ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, - }] - async fn inventory_v4( - rqctx: RequestContext, - ) -> Result, HttpError> { - let HttpResponseOk(inventory) = Self::inventory_v10(rqctx).await?; - inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) - } - /// Fetch sled identifiers #[endpoint { method = GET, @@ -1545,32 +1480,12 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/probes", - versions = VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES.., }] async fn probes_put( request_context: RequestContext, body: TypedBody, ) -> Result; - /// Update the entire set of probe zones on this sled. - /// - /// Probe zones are used to debug networking configuration. They look - /// similar to instances, in that they have an OPTE port on a VPC subnet and - /// external addresses, but no actual VM. - #[endpoint { - operation_id = "probes_put", - method = PUT, - path = "/probes", - versions = ..VERSION_ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES, - }] - async fn probes_put_v6( - request_context: RequestContext, - body: TypedBody, - ) -> Result { - let body = body.try_map(latest::probes::ProbeSet::try_from)?; - Self::probes_put(request_context, body).await - } - /// Create a local storage dataset #[endpoint { operation_id = "local_storage_dataset_ensure", diff --git a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs index 2ad8f868902..6326fa80651 100644 --- a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs +++ b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs @@ -5,7 +5,7 @@ //! Firewall rule types for version `ADD_DUAL_STACK_EXTERNAL_IP_CONFIG`. use crate::v10::instance::ResolvedVpcFirewallRule; -use crate::{v9, v10}; +use crate::v10; use omicron_common::api::external; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -28,18 +28,3 @@ impl TryFrom Ok(Self { vni: v10.vni, rules: v10.rules }) } } - -impl TryFrom - for VpcFirewallRulesEnsureBody -{ - type Error = external::Error; - - fn try_from( - v9: v9::firewall_rules::VpcFirewallRulesEnsureBody, - ) -> Result { - // Chain through v10 - let v10 = - v10::firewall_rules::VpcFirewallRulesEnsureBody::try_from(v9)?; - Self::try_from(v10) - } -} diff --git a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/firewall_rules.rs b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/firewall_rules.rs index df5e46b6e71..6ab8ab9121f 100644 --- a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/firewall_rules.rs +++ b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/firewall_rules.rs @@ -4,7 +4,6 @@ //! Firewall rule types for version `ADD_DUAL_STACK_SHARED_NETWORK_INTERFACES`. -use crate::v9; use crate::v10::instance::ResolvedVpcFirewallRule; use omicron_common::api::external; use schemars::JsonSchema; @@ -16,22 +15,3 @@ pub struct VpcFirewallRulesEnsureBody { pub vni: external::Vni, pub rules: Vec, } - -impl TryFrom - for VpcFirewallRulesEnsureBody -{ - type Error = external::Error; - - fn try_from( - v9: v9::firewall_rules::VpcFirewallRulesEnsureBody, - ) -> Result { - Ok(Self { - vni: v9.vni, - rules: v9 - .rules - .into_iter() - .map(TryInto::try_into) - .collect::>()?, - }) - } -} diff --git a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs index 16c08c4aece..3254b40d50b 100644 --- a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs +++ b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs @@ -113,24 +113,6 @@ pub struct InstanceSledLocalConfig { pub delegated_zvols: Vec, } -impl TryFrom for InstanceEnsureBody { - type Error = external::Error; - - fn try_from( - v9: v9::instance::InstanceEnsureBody, - ) -> Result { - Ok(Self { - vmm_spec: v9.vmm_spec, - local_config: v9.local_config.try_into()?, - vmm_runtime: v9.vmm_runtime, - instance_id: v9.instance_id, - migration_id: v9.migration_id, - propolis_addr: v9.propolis_addr, - metadata: v9.metadata, - }) - } -} - impl TryFrom for InstanceSledLocalConfig { diff --git a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/probes.rs b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/probes.rs index 45c44ce6a1c..99aaa3bdb89 100644 --- a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/probes.rs +++ b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/probes.rs @@ -96,15 +96,3 @@ impl From for IpKind { } } } - -impl TryFrom for ProbeSet { - type Error = ExternalError; - - fn try_from(v6: v6::probes::ProbeSet) -> Result { - v6.probes - .into_iter() - .map(TryInto::try_into) - .collect::>() - .map(|probes| Self { probes }) - } -} diff --git a/sled-agent/types/versions/src/add_probe_put_endpoint/probes.rs b/sled-agent/types/versions/src/add_probe_put_endpoint/probes.rs index 8936c419000..1591fb82316 100644 --- a/sled-agent/types/versions/src/add_probe_put_endpoint/probes.rs +++ b/sled-agent/types/versions/src/add_probe_put_endpoint/probes.rs @@ -4,7 +4,6 @@ use crate::v1::inventory::NetworkInterface; use iddqd::IdHashItem; -use iddqd::IdHashMap; use iddqd::id_upcast; use omicron_uuid_kinds::ProbeUuid; use schemars::JsonSchema; @@ -54,10 +53,3 @@ pub enum IpKind { Ephemeral, Floating, } - -/// A set of probes that the target sled should run. -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct ProbeSet { - /// The exact set of probes to run. - pub probes: IdHashMap, -} diff --git a/sled-agent/types/versions/src/delegate_zvol_to_propolis/firewall_rules.rs b/sled-agent/types/versions/src/delegate_zvol_to_propolis/firewall_rules.rs deleted file mode 100644 index 07aaa064e4d..00000000000 --- a/sled-agent/types/versions/src/delegate_zvol_to_propolis/firewall_rules.rs +++ /dev/null @@ -1,18 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -//! Firewall rule types added in version `DELEGATE_ZVOL_TO_PROPOLIS`. - -use omicron_common::api::external; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -use crate::v1::instance::ResolvedVpcFirewallRule; - -/// Update firewall rules for a VPC -#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] -pub struct VpcFirewallRulesEnsureBody { - pub vni: external::Vni, - pub rules: Vec, -} diff --git a/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs b/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs index 9799deaf58a..3964c92255d 100644 --- a/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs +++ b/sled-agent/types/versions/src/delegate_zvol_to_propolis/instance.rs @@ -2,56 +2,21 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use std::net::{IpAddr, SocketAddr}; +use std::net::IpAddr; use omicron_common::api::external::Hostname; use omicron_common::api::internal::shared::DhcpConfig; use omicron_uuid_kinds::DatasetUuid; use omicron_uuid_kinds::ExternalZpoolUuid; -use omicron_uuid_kinds::InstanceUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use uuid::Uuid; -use crate::v1::instance::InstanceMetadata; use crate::v1::instance::ResolvedVpcFirewallRule; -use crate::v1::instance::VmmRuntimeState; -use crate::v1::instance::VmmSpec; use crate::v1::inventory::NetworkInterface; use crate::v1::inventory::SourceNatConfig; use crate::v7; use crate::v7::instance::InstanceMulticastMembership; -/// The body of a request to ensure that a instance and VMM are known to a sled -/// agent. -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct InstanceEnsureBody { - /// The virtual hardware configuration this virtual machine should have when - /// it is started. - pub vmm_spec: VmmSpec, - - /// Information about the sled-local configuration that needs to be - /// established to make the VM's virtual hardware fully functional. - pub local_config: InstanceSledLocalConfig, - - /// The initial VMM runtime state for the VMM being registered. - pub vmm_runtime: VmmRuntimeState, - - /// The ID of the instance for which this VMM is being created. - pub instance_id: InstanceUuid, - - /// The ID of the migration in to this VMM, if this VMM is being - /// ensured is part of a migration in. If this is `None`, the VMM is not - /// being created due to a migration. - pub migration_id: Option, - - /// The address at which this VMM should serve a Propolis server API. - pub propolis_addr: SocketAddr, - - /// Metadata used to track instance statistics. - pub metadata: InstanceMetadata, -} - /// Describes sled-local configuration that a sled-agent must establish to make /// the instance's virtual hardware fully functional. /// diff --git a/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs b/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs index 2e9bc097fc9..1f5343165af 100644 --- a/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs +++ b/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs @@ -7,5 +7,4 @@ //! This version added support for delegating zvols to Propolis. pub mod dataset; -pub mod firewall_rules; pub mod instance; From a0741fba47d126be9010532c1a9817bf88342285 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 14:19:02 +0000 Subject: [PATCH 11/34] remove up to sled-agent api version 12 --- .../sled-agent-11.0.0-5f3d9f.json.gitstub | 1 - sled-agent/api/src/lib.rs | 53 +------ .../instance.rs | 18 --- .../inventory.rs | 61 -------- .../instance.rs | 37 +---- .../inventory.rs | 134 +----------------- 6 files changed, 11 insertions(+), 293 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-11.0.0-5f3d9f.json.gitstub diff --git a/openapi/sled-agent/sled-agent-11.0.0-5f3d9f.json.gitstub b/openapi/sled-agent/sled-agent-11.0.0-5f3d9f.json.gitstub deleted file mode 100644 index 098636c88f4..00000000000 --- a/openapi/sled-agent/sled-agent-11.0.0-5f3d9f.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -99c3f3ef97f80d1401c54ce0c625af125d4faef3:openapi/sled-agent/sled-agent-11.0.0-5f3d9f.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index ba609fa7ac4..d486fe77e62 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -20,7 +20,7 @@ use omicron_common::api::internal::{ }, }; use sled_agent_types_versions::{ - latest, v1, v9, v10, v11, v12, v14, v16, v17, v18, v20, v22, + latest, v1, v9, v11, v12, v14, v16, v17, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; @@ -79,7 +79,6 @@ api_versions!([ (14, MEASUREMENTS), (13, ADD_TRUST_QUORUM), (12, ADD_SMF_SERVICES_HEALTH_CHECK), - (11, ADD_DUAL_STACK_EXTERNAL_IP_CONFIG), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -405,8 +404,7 @@ pub trait SledAgentApi { operation_id = "omicron_config_put", method = PUT, path = "/omicron-config", - versions = - VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG..VERSION_MEASUREMENTS, + versions = ..VERSION_MEASUREMENTS, }] async fn omicron_config_put_v11( rqctx: RequestContext, @@ -416,20 +414,6 @@ pub trait SledAgentApi { Self::omicron_config_put_v14(rqctx, body).await } - #[endpoint { - operation_id = "omicron_config_put", - method = PUT, - path = "/omicron-config", - versions = ..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG, - }] - async fn omicron_config_put_v10( - rqctx: RequestContext, - body: TypedBody, - ) -> Result { - let body = body.try_map(v11::inventory::OmicronSledConfig::try_from)?; - Self::omicron_config_put_v11(rqctx, body).await - } - #[endpoint { operation_id = "vmm_register", method = PUT, @@ -532,7 +516,7 @@ pub trait SledAgentApi { operation_id = "vmm_register", method = PUT, path = "/vmms/{propolis_id}", - versions = VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL + versions = ..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL }] async fn vmm_register_v11( rqctx: RequestContext, @@ -542,21 +526,6 @@ pub trait SledAgentApi { Self::vmm_register_v17(rqctx, path_params, body.map(Into::into)).await } - #[endpoint { - operation_id = "vmm_register", - method = PUT, - path = "/vmms/{propolis_id}", - versions = ..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG - }] - async fn vmm_register_v10( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - let body = body.try_map(v11::instance::InstanceEnsureBody::try_from)?; - Self::vmm_register_v11(rqctx, path_params, body).await - } - #[endpoint { method = DELETE, path = "/vmms/{propolis_id}" @@ -1265,7 +1234,7 @@ pub trait SledAgentApi { operation_id = "inventory", method = GET, path = "/inventory", - versions = VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG..VERSION_ADD_SMF_SERVICES_HEALTH_CHECK, + versions = ..VERSION_ADD_SMF_SERVICES_HEALTH_CHECK, }] async fn inventory_v11( rqctx: RequestContext, @@ -1275,20 +1244,6 @@ pub trait SledAgentApi { }) } - /// Fetch basic information about this sled - #[endpoint { - operation_id = "inventory", - method = GET, - path = "/inventory", - versions = ..VERSION_ADD_DUAL_STACK_EXTERNAL_IP_CONFIG, - }] - async fn inventory_v10( - rqctx: RequestContext, - ) -> Result, HttpError> { - let HttpResponseOk(inventory) = Self::inventory_v11(rqctx).await?; - inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) - } - /// Fetch sled identifiers #[endpoint { method = GET, diff --git a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs index 3b0cf0ce026..eae1a9dd1fe 100644 --- a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs +++ b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs @@ -74,24 +74,6 @@ pub struct InstanceSledLocalConfig { pub delegated_zvols: Vec, } -impl TryFrom for InstanceEnsureBody { - type Error = external::Error; - - fn try_from( - v10: v10::instance::InstanceEnsureBody, - ) -> Result { - Ok(Self { - vmm_spec: v10.vmm_spec, - local_config: v10.local_config.try_into()?, - vmm_runtime: v10.vmm_runtime, - instance_id: v10.instance_id, - migration_id: v10.migration_id, - propolis_addr: v10.propolis_addr, - metadata: v10.metadata, - }) - } -} - impl TryFrom for InstanceSledLocalConfig { diff --git a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs index 1db4c847fe6..876901caac5 100644 --- a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs +++ b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs @@ -292,36 +292,6 @@ fn default_nexus_lockstep_port() -> u16 { use omicron_common::api::external; -impl TryFrom for Inventory { - type Error = external::Error; - - fn try_from(v10: v10::inventory::Inventory) -> Result { - Ok(Self { - sled_id: v10.sled_id, - sled_agent_address: v10.sled_agent_address, - sled_role: v10.sled_role, - baseboard: v10.baseboard, - usable_hardware_threads: v10.usable_hardware_threads, - usable_physical_ram: v10.usable_physical_ram, - cpu_family: v10.cpu_family, - reservoir_size: v10.reservoir_size, - disks: v10.disks, - zpools: v10.zpools, - datasets: v10.datasets, - ledgered_sled_config: v10 - .ledgered_sled_config - .map(TryInto::try_into) - .transpose()?, - reconciler_status: v10.reconciler_status.try_into()?, - last_reconciliation: v10 - .last_reconciliation - .map(TryInto::try_into) - .transpose()?, - zone_image_resolver: v10.zone_image_resolver, - }) - } -} - impl TryFrom for OmicronSledConfig { type Error = external::Error; @@ -528,37 +498,6 @@ impl TryFrom for OmicronZonesConfig { } } -// Conversions from v11 to v10 for response types -impl TryFrom for v10::inventory::Inventory { - type Error = external::Error; - - fn try_from(v11: Inventory) -> Result { - Ok(Self { - sled_id: v11.sled_id, - sled_agent_address: v11.sled_agent_address, - sled_role: v11.sled_role, - baseboard: v11.baseboard, - usable_hardware_threads: v11.usable_hardware_threads, - usable_physical_ram: v11.usable_physical_ram, - cpu_family: v11.cpu_family, - reservoir_size: v11.reservoir_size, - disks: v11.disks, - zpools: v11.zpools, - datasets: v11.datasets, - ledgered_sled_config: v11 - .ledgered_sled_config - .map(TryInto::try_into) - .transpose()?, - reconciler_status: v11.reconciler_status.try_into()?, - last_reconciliation: v11 - .last_reconciliation - .map(TryInto::try_into) - .transpose()?, - zone_image_resolver: v11.zone_image_resolver, - }) - } -} - impl TryFrom for v10::inventory::OmicronSledConfig { type Error = external::Error; diff --git a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs index 3254b40d50b..0b37264b529 100644 --- a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs +++ b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/instance.rs @@ -3,21 +3,16 @@ // file, You can obtain one at https://mozilla.org/MPL/2.0/. use std::collections::HashSet; -use std::net::{IpAddr, SocketAddr}; +use std::net::IpAddr; use omicron_common::api::external; use omicron_common::api::external::Hostname; use omicron_common::api::internal::nexus::HostIdentifier; use omicron_common::api::internal::shared::DhcpConfig; -use omicron_uuid_kinds::InstanceUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use uuid::Uuid; use super::inventory::NetworkInterface; -use crate::v1::instance::InstanceMetadata; -use crate::v1::instance::VmmRuntimeState; -use crate::v1::instance::VmmSpec; use crate::v1::inventory::SourceNatConfig; use crate::v7::instance::InstanceMulticastMembership; use crate::v9; @@ -66,36 +61,6 @@ pub struct ResolvedVpcFirewallRule { pub priority: external::VpcFirewallRulePriority, } -/// The body of a request to ensure that a instance and VMM are known to a sled -/// agent. -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct InstanceEnsureBody { - /// The virtual hardware configuration this virtual machine should have when - /// it is started. - pub vmm_spec: VmmSpec, - - /// Information about the sled-local configuration that needs to be - /// established to make the VM's virtual hardware fully functional. - pub local_config: InstanceSledLocalConfig, - - /// The initial VMM runtime state for the VMM being registered. - pub vmm_runtime: VmmRuntimeState, - - /// The ID of the instance for which this VMM is being created. - pub instance_id: InstanceUuid, - - /// The ID of the migration in to this VMM, if this VMM is being - /// ensured is part of a migration in. If this is `None`, the VMM is not - /// being created due to a migration. - pub migration_id: Option, - - /// The address at which this VMM should serve a Propolis server API. - pub propolis_addr: SocketAddr, - - /// Metadata used to track instance statistics. - pub metadata: InstanceMetadata, -} - /// Describes sled-local configuration that a sled-agent must establish to make /// the instance's virtual hardware fully functional. #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] diff --git a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs index 4808468a3a7..57561af3b11 100644 --- a/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs +++ b/sled-agent/types/versions/src/add_dual_stack_shared_network_interfaces/inventory.rs @@ -6,7 +6,6 @@ use std::collections::BTreeMap; use std::net::{IpAddr, Ipv6Addr, SocketAddr, SocketAddrV6}; use std::time::Duration; -use crate::v1::inventory::Baseboard; use chrono::{DateTime, Utc}; use iddqd::IdOrdItem; use iddqd::IdOrdMap; @@ -15,51 +14,27 @@ use omicron_common::api::internal::shared::PrivateIpConfig; use omicron_common::api::internal::shared::PrivateIpv4Config; use omicron_common::api::internal::shared::PrivateIpv6Config; use omicron_common::{ - api::external::{self, ByteCount, Name, Vni}, + api::external::{self, Name, Vni}, zpool_name::ZpoolName, }; use omicron_generation_kinds::Generation; use omicron_ledger::Ledgerable; -use omicron_uuid_kinds::SledUuid; use omicron_uuid_kinds::{DatasetUuid, OmicronZoneUuid}; use omicron_uuid_kinds::{MupdateOverrideUuid, PhysicalDiskUuid}; use oxnet::IpNet; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use sled_hardware_types::SledCpuFamily; use uuid::Uuid; use crate::v1::disk::DatasetConfig; use crate::v1::disk::OmicronPhysicalDiskConfig; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, - HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, - NetworkInterfaceKind, OmicronZoneDataset, OmicronZoneImageSource, - OrphanedDataset, RemoveMupdateOverrideInventory, SourceNatConfig, - ZoneImageResolverInventory, + HostPhase2DesiredSlots, NetworkInterfaceKind, OmicronZoneDataset, + OmicronZoneImageSource, OrphanedDataset, RemoveMupdateOverrideInventory, + SourceNatConfig, }; use crate::v4; -use crate::v50::inventory::SledRole; - -/// Identity and basic status information about this sled agent -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct Inventory { - pub sled_id: SledUuid, - pub sled_agent_address: SocketAddrV6, - pub sled_role: SledRole, - pub baseboard: Baseboard, - pub usable_hardware_threads: u32, - pub usable_physical_ram: ByteCount, - pub cpu_family: SledCpuFamily, - pub reservoir_size: ByteCount, - pub disks: Vec, - pub zpools: Vec, - pub datasets: Vec, - pub ledgered_sled_config: Option, - pub reconciler_status: ConfigReconcilerInventoryStatus, - pub last_reconciliation: Option, - pub zone_image_resolver: ZoneImageResolverInventory, -} /// Describes the last attempt made by the sled-agent-config-reconciler to /// reconcile the current sled config against the actual state of the sled. @@ -293,55 +268,6 @@ fn default_nexus_lockstep_port() -> u16 { omicron_common::address::NEXUS_LOCKSTEP_PORT } -impl TryFrom for v4::inventory::Inventory { - type Error = external::Error; - - fn try_from(value: Inventory) -> Result { - let ledgered_sled_config = - value.ledgered_sled_config.map(TryInto::try_into).transpose()?; - let reconciler_status = value.reconciler_status.try_into()?; - let last_reconciliation = - value.last_reconciliation.map(TryInto::try_into).transpose()?; - Ok(Self { - sled_id: value.sled_id, - sled_agent_address: value.sled_agent_address, - sled_role: value.sled_role, - baseboard: value.baseboard, - usable_hardware_threads: value.usable_hardware_threads, - usable_physical_ram: value.usable_physical_ram, - cpu_family: value.cpu_family, - reservoir_size: value.reservoir_size, - disks: value.disks, - zpools: value.zpools, - datasets: value.datasets, - ledgered_sled_config, - reconciler_status, - last_reconciliation, - zone_image_resolver: value.zone_image_resolver, - }) - } -} - -impl TryFrom for v4::inventory::OmicronSledConfig { - type Error = external::Error; - - fn try_from(value: OmicronSledConfig) -> Result { - let zones = value - .zones - .into_iter() - .map(TryInto::try_into) - .collect::>()?; - Ok(Self { - generation: value.generation, - disks: value.disks, - datasets: value.datasets, - zones, - remove_mupdate_override: value.remove_mupdate_override, - host_phase_2: value.host_phase_2, - }) - } -} - impl TryFrom for v4::inventory::OmicronZoneConfig { type Error = external::Error; @@ -457,55 +383,8 @@ impl TryFrom for v4::inventory::OmicronZoneType { } } -impl TryFrom - for v4::inventory::ConfigReconcilerInventory -{ - type Error = external::Error; - - fn try_from(value: ConfigReconcilerInventory) -> Result { - Ok(Self { - last_reconciled_config: value.last_reconciled_config.try_into()?, - external_disks: value.external_disks, - datasets: value.datasets, - orphaned_datasets: value.orphaned_datasets, - zones: value.zones, - boot_partitions: value.boot_partitions, - remove_mupdate_override: value.remove_mupdate_override, - }) - } -} - -impl TryFrom - for v4::inventory::ConfigReconcilerInventoryStatus -{ - type Error = external::Error; - - fn try_from( - value: ConfigReconcilerInventoryStatus, - ) -> Result { - match value { - ConfigReconcilerInventoryStatus::NotYetRun => { - Ok(v4::inventory::ConfigReconcilerInventoryStatus::NotYetRun) - } - ConfigReconcilerInventoryStatus::Running { - config, - started_at, - running_for, - } => Ok(v4::inventory::ConfigReconcilerInventoryStatus::Running { - config: Box::new((*config).try_into()?), - started_at, - running_for, - }), - ConfigReconcilerInventoryStatus::Idle { completed_at, ran_for } => { - Ok(v4::inventory::ConfigReconcilerInventoryStatus::Idle { - completed_at, - ran_for, - }) - } - } - } -} - +// Required for the OmicronSledConfig conversion chain when reading old ledgered +// config impl TryFrom for OmicronSledConfig { type Error = external::Error; @@ -526,7 +405,6 @@ impl TryFrom for OmicronSledConfig { }) } } - impl TryFrom for OmicronZoneConfig { type Error = external::Error; From 928c6df8d7a6e1d5d7bd7db49ad278c095a4c1e3 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 14:32:53 +0000 Subject: [PATCH 12/34] remove up to sled-agent api version 13 --- .../sled-agent-12.0.0-ffacab.json.gitstub | 1 - sled-agent/api/src/lib.rs | 18 +------- .../inventory.rs | 30 +------------- .../src/add_health_monitor/inventory.rs | 41 ------------------- 4 files changed, 3 insertions(+), 87 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-12.0.0-ffacab.json.gitstub diff --git a/openapi/sled-agent/sled-agent-12.0.0-ffacab.json.gitstub b/openapi/sled-agent/sled-agent-12.0.0-ffacab.json.gitstub deleted file mode 100644 index e64b80c3b63..00000000000 --- a/openapi/sled-agent/sled-agent-12.0.0-ffacab.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -63c01899a7668044841021075711919160c90b1e:openapi/sled-agent/sled-agent-12.0.0-ffacab.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index d486fe77e62..bad8c759464 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -78,7 +78,6 @@ api_versions!([ (15, ADD_TRUST_QUORUM_STATUS), (14, MEASUREMENTS), (13, ADD_TRUST_QUORUM), - (12, ADD_SMF_SERVICES_HEALTH_CHECK), // Versions before this have been retired. We no longer support in any // server, nor expect it from any client. ]); @@ -1220,7 +1219,7 @@ pub trait SledAgentApi { operation_id = "inventory", method = GET, path = "/inventory", - versions = VERSION_ADD_SMF_SERVICES_HEALTH_CHECK..VERSION_MEASUREMENTS, + versions = ..VERSION_MEASUREMENTS, }] async fn inventory_v12( rqctx: RequestContext, @@ -1229,21 +1228,6 @@ pub trait SledAgentApi { inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) } - /// Fetch basic information about this sled - #[endpoint { - operation_id = "inventory", - method = GET, - path = "/inventory", - versions = ..VERSION_ADD_SMF_SERVICES_HEALTH_CHECK, - }] - async fn inventory_v11( - rqctx: RequestContext, - ) -> Result, HttpError> { - Self::inventory_v12(rqctx).await.map(|HttpResponseOk(inv)| { - HttpResponseOk(v11::inventory::Inventory::from(inv)) - }) - } - /// Fetch sled identifiers #[endpoint { method = GET, diff --git a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs index 876901caac5..74d29d33c65 100644 --- a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs +++ b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/inventory.rs @@ -12,12 +12,10 @@ use iddqd::IdOrdMap; use iddqd::id_upcast; use omicron_common::{ address::{Ip, NUM_SOURCE_NAT_PORTS}, - api::external::ByteCount, zpool_name::ZpoolName, }; use omicron_generation_kinds::Generation; use omicron_ledger::Ledgerable; -use omicron_uuid_kinds::SledUuid; use omicron_uuid_kinds::{DatasetUuid, OmicronZoneUuid}; use omicron_uuid_kinds::{MupdateOverrideUuid, PhysicalDiskUuid}; use schemars::JsonSchema; @@ -26,37 +24,13 @@ use serde::{Deserialize, Serialize}; use crate::impls::inventory::SourceNatConfigError; use crate::v1::disk::DatasetConfig; use crate::v1::disk::OmicronPhysicalDiskConfig; -use crate::v1::inventory::Baseboard; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, - HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, - OmicronZoneDataset, OmicronZoneImageSource, OrphanedDataset, - RemoveMupdateOverrideInventory, ZoneImageResolverInventory, + HostPhase2DesiredSlots, OmicronZoneDataset, OmicronZoneImageSource, + OrphanedDataset, RemoveMupdateOverrideInventory, }; -use crate::v50::inventory::SledRole; use crate::v10; use crate::v10::inventory::NetworkInterface; -use sled_hardware_types::SledCpuFamily; - -/// Identity and basic status information about this sled agent -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct Inventory { - pub sled_id: SledUuid, - pub sled_agent_address: SocketAddrV6, - pub sled_role: SledRole, - pub baseboard: Baseboard, - pub usable_hardware_threads: u32, - pub usable_physical_ram: ByteCount, - pub cpu_family: SledCpuFamily, - pub reservoir_size: ByteCount, - pub disks: Vec, - pub zpools: Vec, - pub datasets: Vec, - pub ledgered_sled_config: Option, - pub reconciler_status: ConfigReconcilerInventoryStatus, - pub last_reconciliation: Option, - pub zone_image_resolver: ZoneImageResolverInventory, -} /// Describes the last attempt made by the sled-agent-config-reconciler to /// reconcile the current sled config against the actual state of the sled. diff --git a/sled-agent/types/versions/src/add_health_monitor/inventory.rs b/sled-agent/types/versions/src/add_health_monitor/inventory.rs index c6b8b3c222b..0d62fa60f2f 100644 --- a/sled-agent/types/versions/src/add_health_monitor/inventory.rs +++ b/sled-agent/types/versions/src/add_health_monitor/inventory.rs @@ -20,7 +20,6 @@ use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::InventoryZpool; use crate::v50::inventory::SledRole; use crate::v1::inventory::ZoneImageResolverInventory; -use crate::v11; pub use crate::v11::inventory::ConfigReconcilerInventory; pub use crate::v11::inventory::ConfigReconcilerInventoryStatus; pub use crate::v11::inventory::OmicronSledConfig; @@ -46,46 +45,6 @@ pub struct Inventory { pub health_monitor: HealthMonitorInventory, } -impl From for v11::inventory::Inventory { - fn from(value: Inventory) -> Self { - let Inventory { - sled_id, - sled_agent_address, - sled_role, - baseboard, - usable_hardware_threads, - usable_physical_ram, - cpu_family, - reservoir_size, - disks, - zpools, - datasets, - ledgered_sled_config, - reconciler_status, - last_reconciliation, - zone_image_resolver, - health_monitor: _, - } = value; - Self { - sled_id, - sled_agent_address, - sled_role, - baseboard, - usable_hardware_threads, - usable_physical_ram, - cpu_family, - reservoir_size, - disks, - zpools, - datasets, - ledgered_sled_config, - reconciler_status, - last_reconciliation, - zone_image_resolver, - } - } -} - /// Fields of sled-agent inventory reported by the health monitor subsystem. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] #[serde(rename_all = "snake_case")] From ea85da67995f2e96b664eed084c4dee316133d08 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 14:35:17 +0000 Subject: [PATCH 13/34] remove up to sled-agent api version 14 --- .../sled-agent-13.0.0-c4af95.json.gitstub | 1 - sled-agent/api/src/lib.rs | 13 ++----------- 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-13.0.0-c4af95.json.gitstub diff --git a/openapi/sled-agent/sled-agent-13.0.0-c4af95.json.gitstub b/openapi/sled-agent/sled-agent-13.0.0-c4af95.json.gitstub deleted file mode 100644 index c7b741e0b70..00000000000 --- a/openapi/sled-agent/sled-agent-13.0.0-c4af95.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -29da4b2d1a23cf9bf659b7962c2cd5ade6d7af0a:openapi/sled-agent/sled-agent-13.0.0-c4af95.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index bad8c759464..9ddbfcafc70 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -77,9 +77,8 @@ api_versions!([ (16, MEASUREMENT_PROPER_INVENTORY), (15, ADD_TRUST_QUORUM_STATUS), (14, MEASUREMENTS), - (13, ADD_TRUST_QUORUM), - // Versions before this have been retired. We no longer support in any - // server, nor expect it from any client. + // Versions before this have been retired. We no longer support them in any + // server, nor expect them from any client. ]); // WHEN CHANGING THE API (part 2 of 2): @@ -1507,7 +1506,6 @@ pub trait SledAgentApi { #[endpoint { method = POST, path = "/trust-quorum/configuration", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_reconfigure( request_context: RequestContext, @@ -1518,7 +1516,6 @@ pub trait SledAgentApi { #[endpoint { method = POST, path = "/trust-quorum/upgrade", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_upgrade_from_lrtq( request_context: RequestContext, @@ -1529,7 +1526,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/trust-quorum/commit", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_commit( request_context: RequestContext, @@ -1540,7 +1536,6 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/trust-quorum/coordinator-status", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_coordinator_status( request_context: RequestContext, @@ -1553,7 +1548,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/trust-quorum/prepare-and-commit", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_prepare_and_commit( request_context: RequestContext, @@ -1567,7 +1561,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/trust-quorum/proxy/commit", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_proxy_commit( request_context: RequestContext, @@ -1578,7 +1571,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/trust-quorum/proxy/prepare-and-commit", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_proxy_prepare_and_commit( request_context: RequestContext, @@ -1592,7 +1584,6 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/trust-quorum/proxy/status", - versions = VERSION_ADD_TRUST_QUORUM.., }] async fn trust_quorum_proxy_status( request_context: RequestContext, From 8bd05635aff14e063407505b2e8d753561e05182 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 14:40:43 +0000 Subject: [PATCH 14/34] remove up to sled-agent api version 15 --- .../sled-agent-14.0.0-bca1c8.json.gitstub | 1 - sled-agent/api/src/lib.rs | 35 ++----------------- .../src/add_health_monitor/inventory.rs | 31 ---------------- .../versions/src/measurements/inventory.rs | 31 ---------------- 4 files changed, 3 insertions(+), 95 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-14.0.0-bca1c8.json.gitstub diff --git a/openapi/sled-agent/sled-agent-14.0.0-bca1c8.json.gitstub b/openapi/sled-agent/sled-agent-14.0.0-bca1c8.json.gitstub deleted file mode 100644 index 495b9e9b29f..00000000000 --- a/openapi/sled-agent/sled-agent-14.0.0-bca1c8.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -8ae817f7284debada072ecde2cb925515dddcb88:openapi/sled-agent/sled-agent-14.0.0-bca1c8.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 9ddbfcafc70..bd179df8918 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -20,7 +20,7 @@ use omicron_common::api::internal::{ }, }; use sled_agent_types_versions::{ - latest, v1, v9, v11, v12, v14, v16, v17, v18, v20, v22, + latest, v1, v9, v11, v14, v16, v17, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; @@ -76,7 +76,6 @@ api_versions!([ (17, TWO_TYPES_OF_DELEGATED_ZVOL), (16, MEASUREMENT_PROPER_INVENTORY), (15, ADD_TRUST_QUORUM_STATUS), - (14, MEASUREMENTS), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -389,7 +388,7 @@ pub trait SledAgentApi { operation_id = "omicron_config_put", method = PUT, path = "/omicron-config", - versions = VERSION_MEASUREMENTS..VERSION_ADD_UPDATE_DISPOSITION, + versions = ..VERSION_ADD_UPDATE_DISPOSITION, }] async fn omicron_config_put_v14( rqctx: RequestContext, @@ -398,20 +397,6 @@ pub trait SledAgentApi { Self::omicron_config_put_v49(rqctx, body.map(Into::into)).await } - #[endpoint { - operation_id = "omicron_config_put", - method = PUT, - path = "/omicron-config", - versions = ..VERSION_MEASUREMENTS, - }] - async fn omicron_config_put_v11( - rqctx: RequestContext, - body: TypedBody, - ) -> Result { - let body = body.try_map(v14::inventory::OmicronSledConfig::try_from)?; - Self::omicron_config_put_v14(rqctx, body).await - } - #[endpoint { operation_id = "vmm_register", method = PUT, @@ -1204,7 +1189,7 @@ pub trait SledAgentApi { operation_id = "inventory", method = GET, path = "/inventory", - versions = VERSION_MEASUREMENTS..VERSION_MEASUREMENT_PROPER_INVENTORY, + versions = ..VERSION_MEASUREMENT_PROPER_INVENTORY, }] async fn inventory_v14( rqctx: RequestContext, @@ -1213,20 +1198,6 @@ pub trait SledAgentApi { inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) } - /// Fetch basic information about this sled - #[endpoint { - operation_id = "inventory", - method = GET, - path = "/inventory", - versions = ..VERSION_MEASUREMENTS, - }] - async fn inventory_v12( - rqctx: RequestContext, - ) -> Result, HttpError> { - let HttpResponseOk(inventory) = Self::inventory_v14(rqctx).await?; - inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) - } - /// Fetch sled identifiers #[endpoint { method = GET, diff --git a/sled-agent/types/versions/src/add_health_monitor/inventory.rs b/sled-agent/types/versions/src/add_health_monitor/inventory.rs index 0d62fa60f2f..a99e426aa19 100644 --- a/sled-agent/types/versions/src/add_health_monitor/inventory.rs +++ b/sled-agent/types/versions/src/add_health_monitor/inventory.rs @@ -2,49 +2,18 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use crate::v1::inventory::Baseboard; use chrono::DateTime; use chrono::Utc; -use omicron_common::api::external::ByteCount; use omicron_common::snake_case_result; use omicron_common::snake_case_result::SnakeCaseResult; -use omicron_uuid_kinds::SledUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use sled_hardware_types::SledCpuFamily; use std::fmt::Display; -use std::net::SocketAddrV6; -use crate::v1::inventory::InventoryDataset; -use crate::v1::inventory::InventoryDisk; -use crate::v1::inventory::InventoryZpool; -use crate::v50::inventory::SledRole; -use crate::v1::inventory::ZoneImageResolverInventory; pub use crate::v11::inventory::ConfigReconcilerInventory; pub use crate::v11::inventory::ConfigReconcilerInventoryStatus; pub use crate::v11::inventory::OmicronSledConfig; -/// Identity and basic status information about this sled agent -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct Inventory { - pub sled_id: SledUuid, - pub sled_agent_address: SocketAddrV6, - pub sled_role: SledRole, - pub baseboard: Baseboard, - pub usable_hardware_threads: u32, - pub usable_physical_ram: ByteCount, - pub cpu_family: SledCpuFamily, - pub reservoir_size: ByteCount, - pub disks: Vec, - pub zpools: Vec, - pub datasets: Vec, - pub ledgered_sled_config: Option, - pub reconciler_status: ConfigReconcilerInventoryStatus, - pub last_reconciliation: Option, - pub zone_image_resolver: ZoneImageResolverInventory, - pub health_monitor: HealthMonitorInventory, -} - /// Fields of sled-agent inventory reported by the health monitor subsystem. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] #[serde(rename_all = "snake_case")] diff --git a/sled-agent/types/versions/src/measurements/inventory.rs b/sled-agent/types/versions/src/measurements/inventory.rs index 94ded2e2f85..ac97a9a105d 100644 --- a/sled-agent/types/versions/src/measurements/inventory.rs +++ b/sled-agent/types/versions/src/measurements/inventory.rs @@ -62,37 +62,6 @@ pub struct Inventory { pub health_monitor: HealthMonitorInventory, } -impl TryFrom for v12::inventory::Inventory { - type Error = external::Error; - - fn try_from(value: Inventory) -> Result { - let ledgered_sled_config = - value.ledgered_sled_config.map(TryInto::try_into).transpose()?; - let last_reconciliation = - value.last_reconciliation.map(TryInto::try_into).transpose()?; - let zone_image_resolver = value.file_source_resolver.try_into()?; - let reconciler_status = value.reconciler_status.try_into()?; - Ok(Self { - sled_id: value.sled_id, - sled_agent_address: value.sled_agent_address, - sled_role: value.sled_role, - baseboard: value.baseboard, - usable_hardware_threads: value.usable_hardware_threads, - usable_physical_ram: value.usable_physical_ram, - cpu_family: value.cpu_family, - reservoir_size: value.reservoir_size, - disks: value.disks, - zpools: value.zpools, - datasets: value.datasets, - ledgered_sled_config, - reconciler_status, - last_reconciliation, - zone_image_resolver, - health_monitor: value.health_monitor, - }) - } -} - /// Inventory representation of zone image resolver and measurement resolver /// status and health. Previously known as `ZoneImageResolverInventory` #[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] From 34ee649856c9a48c238ba139e4c95deb3dcf4ffd Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 14:43:43 +0000 Subject: [PATCH 15/34] remove up to sled-agent api version 16 --- openapi/sled-agent/sled-agent-15.0.0-92bd2d.json.gitstub | 1 - sled-agent/api/src/lib.rs | 4 ---- 2 files changed, 5 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-15.0.0-92bd2d.json.gitstub diff --git a/openapi/sled-agent/sled-agent-15.0.0-92bd2d.json.gitstub b/openapi/sled-agent/sled-agent-15.0.0-92bd2d.json.gitstub deleted file mode 100644 index 7efff716e69..00000000000 --- a/openapi/sled-agent/sled-agent-15.0.0-92bd2d.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -ec9b6ccc010316b586cce160f85937b92dfc277f:openapi/sled-agent/sled-agent-15.0.0-92bd2d.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index bd179df8918..50b78f3afa3 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -75,7 +75,6 @@ api_versions!([ (18, ADD_ATTACHED_SUBNETS), (17, TWO_TYPES_OF_DELEGATED_ZVOL), (16, MEASUREMENT_PROPER_INVENTORY), - (15, ADD_TRUST_QUORUM_STATUS), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -1565,7 +1564,6 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/trust-quorum/status", - versions = VERSION_ADD_TRUST_QUORUM_STATUS.., }] async fn trust_quorum_status( request_context: RequestContext, @@ -1575,7 +1573,6 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/trust-quorum/network-config", - versions = VERSION_ADD_TRUST_QUORUM_STATUS.., }] async fn trust_quorum_network_config_get( request_context: RequestContext, @@ -1588,7 +1585,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/trust-quorum/network-config", - versions = VERSION_ADD_TRUST_QUORUM_STATUS.., }] async fn trust_quorum_network_config_put( request_context: RequestContext, From bd4d05ec40dbc686c16395f121f5f77f575574d9 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 15:07:42 +0000 Subject: [PATCH 16/34] remove up to sled-agent api version 17 --- .../sled-agent-16.0.0-1923e2.json.gitstub | 1 - sled-agent/api/src/lib.rs | 17 +------ .../measurement_proper_inventory/inventory.rs | 51 ------------------- .../versions/src/measurements/inventory.rs | 29 +---------- 4 files changed, 2 insertions(+), 96 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-16.0.0-1923e2.json.gitstub diff --git a/openapi/sled-agent/sled-agent-16.0.0-1923e2.json.gitstub b/openapi/sled-agent/sled-agent-16.0.0-1923e2.json.gitstub deleted file mode 100644 index 005123829b9..00000000000 --- a/openapi/sled-agent/sled-agent-16.0.0-1923e2.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -9163f85d9c0a8bc68a247f81c2543d30beb710ff:openapi/sled-agent/sled-agent-16.0.0-1923e2.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 50b78f3afa3..4f8dea91002 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -74,7 +74,6 @@ api_versions!([ (19, ADD_ROT_ATTESTATION), (18, ADD_ATTACHED_SUBNETS), (17, TWO_TYPES_OF_DELEGATED_ZVOL), - (16, MEASUREMENT_PROPER_INVENTORY), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -1173,7 +1172,7 @@ pub trait SledAgentApi { operation_id = "inventory", method = GET, path = "/inventory", - versions = VERSION_MEASUREMENT_PROPER_INVENTORY..VERSION_REMOVE_HEALTH_MONITOR_KEEP_CHECKS, + versions = ..VERSION_REMOVE_HEALTH_MONITOR_KEEP_CHECKS, }] async fn inventory_v16( rqctx: RequestContext, @@ -1183,20 +1182,6 @@ pub trait SledAgentApi { }) } - /// Fetch basic information about this sled - #[endpoint { - operation_id = "inventory", - method = GET, - path = "/inventory", - versions = ..VERSION_MEASUREMENT_PROPER_INVENTORY, - }] - async fn inventory_v14( - rqctx: RequestContext, - ) -> Result, HttpError> { - let HttpResponseOk(inventory) = Self::inventory_v16(rqctx).await?; - inventory.try_into().map_err(HttpError::from).map(HttpResponseOk) - } - /// Fetch sled identifiers #[endpoint { method = GET, diff --git a/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs b/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs index f61521e6cae..87628f8d55e 100644 --- a/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs +++ b/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs @@ -6,7 +6,6 @@ use crate::v1::inventory::Baseboard; use camino::Utf8PathBuf; use iddqd::id_upcast; use iddqd::{IdOrdItem, IdOrdMap}; -use omicron_common::api::external; use omicron_common::api::external::ByteCount; use omicron_uuid_kinds::PhysicalDiskUuid; use omicron_uuid_kinds::SledUuid; @@ -25,11 +24,9 @@ use crate::v1::inventory::{ RemoveMupdateOverrideInventory, }; use crate::v50::inventory::SledRole; -use crate::v14; use crate::v14::inventory::{ ConfigReconcilerInventoryStatus, HealthMonitorInventory, OmicronFileSourceResolverInventory, OmicronSledConfig, - ReconciledSingleMeasurement, }; /// Identity and basic status information about this sled agent @@ -54,54 +51,6 @@ pub struct Inventory { pub reference_measurements: IdOrdMap, } -impl TryFrom for v14::inventory::Inventory { - type Error = external::Error; - - fn try_from(value: Inventory) -> Result { - let measurements = value - .reference_measurements - .into_iter() - .map(|m| ReconciledSingleMeasurement { - file_name: m.path.file_name().unwrap_or("").to_string(), - path: m.path, - result: m.result, - }) - .collect(); - - let last_reconciliation = value.last_reconciliation.map(|v| { - v14::inventory::ConfigReconcilerInventory { - last_reconciled_config: v.last_reconciled_config, - external_disks: v.external_disks, - datasets: v.datasets, - orphaned_datasets: v.orphaned_datasets, - zones: v.zones, - boot_partitions: v.boot_partitions, - remove_mupdate_override: v.remove_mupdate_override, - measurements, - } - }); - - Ok(Self { - sled_id: value.sled_id, - sled_agent_address: value.sled_agent_address, - sled_role: value.sled_role, - baseboard: value.baseboard, - usable_hardware_threads: value.usable_hardware_threads, - usable_physical_ram: value.usable_physical_ram, - cpu_family: value.cpu_family, - reservoir_size: value.reservoir_size, - disks: value.disks, - zpools: value.zpools, - datasets: value.datasets, - ledgered_sled_config: value.ledgered_sled_config, - reconciler_status: value.reconciler_status, - last_reconciliation, - file_source_resolver: value.file_source_resolver, - health_monitor: value.health_monitor, - }) - } -} - /// Describes the last attempt made by the sled-agent-config-reconciler to /// reconcile the current sled config against the actual state of the sled. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/measurements/inventory.rs b/sled-agent/types/versions/src/measurements/inventory.rs index ac97a9a105d..589100d1656 100644 --- a/sled-agent/types/versions/src/measurements/inventory.rs +++ b/sled-agent/types/versions/src/measurements/inventory.rs @@ -3,23 +3,18 @@ // file, You can obtain one at https://mozilla.org/MPL/2.0/. use std::collections::{BTreeMap, BTreeSet}; -use std::net::SocketAddrV6; -use crate::v1::inventory::Baseboard; use chrono::{DateTime, Utc}; use iddqd::IdOrdItem; use iddqd::IdOrdMap; use iddqd::id_upcast; use omicron_common::api::external; -use omicron_common::api::external::ByteCount; use omicron_generation_kinds::Generation; use omicron_ledger::Ledgerable; -use omicron_uuid_kinds::SledUuid; use omicron_uuid_kinds::{DatasetUuid, OmicronZoneUuid}; use omicron_uuid_kinds::{MupdateOverrideUuid, PhysicalDiskUuid}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use sled_hardware_types::SledCpuFamily; use std::time::Duration; use crate::v1; @@ -27,11 +22,10 @@ use crate::v1::disk::DatasetConfig; use crate::v1::disk::OmicronPhysicalDiskConfig; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, - HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, + HostPhase2DesiredSlots, ManifestInventory, MupdateOverrideInventory, OrphanedDataset, RemoveMupdateOverrideInventory, }; -use crate::v50::inventory::SledRole; use crate::v11::inventory::OmicronZoneConfig; use crate::v12; pub use crate::v12::inventory::HealthMonitorInventory; @@ -41,27 +35,6 @@ use schemars::schema::{Schema, SchemaObject}; use std::fmt; use tufaceous_artifact::ArtifactHash; -/// Identity and basic status information about this sled agent -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct Inventory { - pub sled_id: SledUuid, - pub sled_agent_address: SocketAddrV6, - pub sled_role: SledRole, - pub baseboard: Baseboard, - pub usable_hardware_threads: u32, - pub usable_physical_ram: ByteCount, - pub cpu_family: SledCpuFamily, - pub reservoir_size: ByteCount, - pub disks: Vec, - pub zpools: Vec, - pub datasets: Vec, - pub ledgered_sled_config: Option, - pub reconciler_status: ConfigReconcilerInventoryStatus, - pub last_reconciliation: Option, - pub file_source_resolver: OmicronFileSourceResolverInventory, - pub health_monitor: HealthMonitorInventory, -} - /// Inventory representation of zone image resolver and measurement resolver /// status and health. Previously known as `ZoneImageResolverInventory` #[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] From 581a0cd6880180f89b435c9f93d3385b9b632042 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 16:11:19 +0000 Subject: [PATCH 17/34] remove up to sled-agent api version 18 --- .../sled-agent-17.0.0-cb6649.json.gitstub | 1 - sled-agent/api/src/lib.rs | 76 +------------------ .../instance.rs | 36 --------- .../src/delegate_zvol_to_propolis/dataset.rs | 25 ------ .../src/delegate_zvol_to_propolis/mod.rs | 1 - sled-agent/types/versions/src/latest.rs | 1 - .../two_types_of_delegated_zvol/dataset.rs | 20 ----- .../two_types_of_delegated_zvol/instance.rs | 14 ---- 8 files changed, 2 insertions(+), 172 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-17.0.0-cb6649.json.gitstub delete mode 100644 sled-agent/types/versions/src/delegate_zvol_to_propolis/dataset.rs diff --git a/openapi/sled-agent/sled-agent-17.0.0-cb6649.json.gitstub b/openapi/sled-agent/sled-agent-17.0.0-cb6649.json.gitstub deleted file mode 100644 index c6d2d632aca..00000000000 --- a/openapi/sled-agent/sled-agent-17.0.0-cb6649.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -8b491f85be637556afcefebccaacd95d215a7028:openapi/sled-agent/sled-agent-17.0.0-cb6649.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 4f8dea91002..1194c25758d 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -20,7 +20,7 @@ use omicron_common::api::internal::{ }, }; use sled_agent_types_versions::{ - latest, v1, v9, v11, v14, v16, v17, v18, v20, v22, + latest, v1, v11, v14, v16, v17, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; @@ -73,7 +73,6 @@ api_versions!([ (20, BGP_V6), (19, ADD_ROT_ATTESTATION), (18, ADD_ATTACHED_SUBNETS), - (17, TWO_TYPES_OF_DELEGATED_ZVOL), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -482,8 +481,7 @@ pub trait SledAgentApi { operation_id = "vmm_register", method = PUT, path = "/vmms/{propolis_id}", - versions = - VERSION_TWO_TYPES_OF_DELEGATED_ZVOL..VERSION_ADD_ATTACHED_SUBNETS + versions = ..VERSION_ADD_ATTACHED_SUBNETS }] async fn vmm_register_v17( rqctx: RequestContext, @@ -493,20 +491,6 @@ pub trait SledAgentApi { Self::vmm_register_v18(rqctx, path_params, body.map(Into::into)).await } - #[endpoint { - operation_id = "vmm_register", - method = PUT, - path = "/vmms/{propolis_id}", - versions = ..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL - }] - async fn vmm_register_v11( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - Self::vmm_register_v17(rqctx, path_params, body.map(Into::into)).await - } - #[endpoint { method = DELETE, path = "/vmms/{propolis_id}" @@ -1384,79 +1368,23 @@ pub trait SledAgentApi { operation_id = "local_storage_dataset_ensure", method = POST, path = "/local-storage", - versions = VERSION_TWO_TYPES_OF_DELEGATED_ZVOL.., }] async fn local_storage_dataset_ensure( request_context: RequestContext, body: TypedBody, ) -> Result; - /// Create a local storage dataset - #[endpoint { - operation_id = "local_storage_dataset_ensure", - method = POST, - path = "/local-storage/{zpool_id}/{dataset_id}", - versions = ..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL, - }] - async fn local_storage_dataset_ensure_v9( - request_context: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result { - let path_params = path_params.into_inner(); - let body = body.into_inner(); - - Self::local_storage_dataset_ensure( - request_context, - latest::dataset::LocalStorageDatasetEnsureRequest::from( - path_params.zpool_id, - path_params.dataset_id, - body, - ) - .into(), - ) - .await - } - /// Delete a local storage dataset #[endpoint { operation_id = "local_storage_dataset_delete", method = DELETE, path = "/local-storage", - versions = VERSION_TWO_TYPES_OF_DELEGATED_ZVOL.., }] async fn local_storage_dataset_delete( request_context: RequestContext, body: TypedBody, ) -> Result; - /// Delete a local storage dataset - #[endpoint { - operation_id = "local_storage_dataset_delete", - method = DELETE, - path = "/local-storage/{zpool_id}/{dataset_id}", - versions = ..VERSION_TWO_TYPES_OF_DELEGATED_ZVOL, - }] - async fn local_storage_dataset_delete_v9( - request_context: RequestContext, - path_params: Path, - ) -> Result { - let path_params = path_params.into_inner(); - - Self::local_storage_dataset_delete( - request_context, - latest::dataset::LocalStorageDatasetDeleteRequest { - zpool_id: path_params.zpool_id, - dataset_id: path_params.dataset_id, - // This version of the API assumed it would be using the - // encrypted dataset. - encrypted_at_rest: true, - } - .into(), - ) - .await - } - /// Initiate a trust quorum reconfiguration #[endpoint { method = POST, diff --git a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs index eae1a9dd1fe..62d5d945f40 100644 --- a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs +++ b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/instance.rs @@ -5,62 +5,26 @@ use std::net::IpAddr; use std::net::Ipv4Addr; use std::net::Ipv6Addr; -use std::net::SocketAddr; use itertools::Either; use itertools::Itertools; use omicron_common::api::external; use omicron_common::api::external::Hostname; use omicron_common::api::internal::shared::DhcpConfig; -use omicron_uuid_kinds::InstanceUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use uuid::Uuid; use super::inventory::SourceNatConfig; use super::inventory::SourceNatConfigV4; use super::inventory::SourceNatConfigV6; use crate::impls::inventory::SourceNatConfigError; use crate::v1; -use crate::v1::instance::InstanceMetadata; -use crate::v1::instance::VmmRuntimeState; -use crate::v1::instance::VmmSpec; use crate::v7::instance::InstanceMulticastMembership; use crate::v9::instance::DelegatedZvol; use crate::v10; use crate::v10::instance::ResolvedVpcFirewallRule; use crate::v10::inventory::NetworkInterface; -/// The body of a request to ensure that a instance and VMM are known to a sled -/// agent. -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct InstanceEnsureBody { - /// The virtual hardware configuration this virtual machine should have when - /// it is started. - pub vmm_spec: VmmSpec, - - /// Information about the sled-local configuration that needs to be - /// established to make the VM's virtual hardware fully functional. - pub local_config: InstanceSledLocalConfig, - - /// The initial VMM runtime state for the VMM being registered. - pub vmm_runtime: VmmRuntimeState, - - /// The ID of the instance for which this VMM is being created. - pub instance_id: InstanceUuid, - - /// The ID of the migration in to this VMM, if this VMM is being - /// ensured is part of a migration in. If this is `None`, the VMM is not - /// being created due to a migration. - pub migration_id: Option, - - /// The address at which this VMM should serve a Propolis server API. - pub propolis_addr: SocketAddr, - - /// Metadata used to track instance statistics. - pub metadata: InstanceMetadata, -} - /// Describes sled-local configuration that a sled-agent must establish to make /// the instance's virtual hardware fully functional. #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] diff --git a/sled-agent/types/versions/src/delegate_zvol_to_propolis/dataset.rs b/sled-agent/types/versions/src/delegate_zvol_to_propolis/dataset.rs deleted file mode 100644 index 6770c17b52a..00000000000 --- a/sled-agent/types/versions/src/delegate_zvol_to_propolis/dataset.rs +++ /dev/null @@ -1,25 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -use omicron_common::api::external::ByteCount; -use omicron_uuid_kinds::{DatasetUuid, ExternalZpoolUuid}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -/// Path parameters for Local Storage dataset related requests. -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct LocalStoragePathParam { - pub zpool_id: ExternalZpoolUuid, - pub dataset_id: DatasetUuid, -} - -/// Dataset and Volume details for a Local Storage dataset ensure request. -#[derive(Clone, Serialize, Deserialize, JsonSchema)] -pub struct LocalStorageDatasetEnsureRequest { - /// Size of the parent dataset - pub dataset_size: ByteCount, - - /// Size of the zvol - pub volume_size: ByteCount, -} diff --git a/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs b/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs index 1f5343165af..aea467d9d07 100644 --- a/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs +++ b/sled-agent/types/versions/src/delegate_zvol_to_propolis/mod.rs @@ -6,5 +6,4 @@ //! //! This version added support for delegating zvols to Propolis. -pub mod dataset; pub mod instance; diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index 718352fe76c..a4fcec95753 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -27,7 +27,6 @@ pub mod bootstore { } pub mod dataset { - pub use crate::v9::dataset::LocalStoragePathParam; pub use crate::v17::dataset::LocalStorageDatasetDeleteRequest; pub use crate::v17::dataset::LocalStorageDatasetEnsureRequest; } diff --git a/sled-agent/types/versions/src/two_types_of_delegated_zvol/dataset.rs b/sled-agent/types/versions/src/two_types_of_delegated_zvol/dataset.rs index b362691c1fa..ad84508471e 100644 --- a/sled-agent/types/versions/src/two_types_of_delegated_zvol/dataset.rs +++ b/sled-agent/types/versions/src/two_types_of_delegated_zvol/dataset.rs @@ -8,8 +8,6 @@ use omicron_uuid_kinds::ExternalZpoolUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use crate::v9; - /// Dataset and Volume details for a Local Storage dataset ensure request. #[derive(Clone, Serialize, Deserialize, JsonSchema)] pub struct LocalStorageDatasetEnsureRequest { @@ -29,24 +27,6 @@ pub struct LocalStorageDatasetEnsureRequest { pub encrypted_at_rest: bool, } -impl LocalStorageDatasetEnsureRequest { - pub fn from( - zpool_id: ExternalZpoolUuid, - dataset_id: DatasetUuid, - v9: v9::dataset::LocalStorageDatasetEnsureRequest, - ) -> LocalStorageDatasetEnsureRequest { - LocalStorageDatasetEnsureRequest { - zpool_id, - dataset_id, - dataset_size: v9.dataset_size, - volume_size: v9.dataset_size, - // This version of the API assumed it would be using the encrypted - // dataset. - encrypted_at_rest: true, - } - } -} - /// Dataset details for a Local Storage dataset delete request. #[derive(Clone, Serialize, Deserialize, JsonSchema)] pub struct LocalStorageDatasetDeleteRequest { diff --git a/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs b/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs index 7624ebd4da6..f7a25a3af04 100644 --- a/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs +++ b/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs @@ -81,20 +81,6 @@ impl From for DelegatedZvol { } } -impl From for InstanceEnsureBody { - fn from(v11: v11::instance::InstanceEnsureBody) -> InstanceEnsureBody { - InstanceEnsureBody { - vmm_spec: v11.vmm_spec, - local_config: v11.local_config.into(), - vmm_runtime: v11.vmm_runtime, - instance_id: v11.instance_id, - migration_id: v11.migration_id, - propolis_addr: v11.propolis_addr, - metadata: v11.metadata, - } - } -} - impl From for InstanceSledLocalConfig { fn from( v11: v11::instance::InstanceSledLocalConfig, From 0722a9ffbce53cb0697276885531843b4c71c61d Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 16:18:05 +0000 Subject: [PATCH 18/34] remove up to sled-agent api version 19 --- .../sled-agent-18.0.0-93d4c3.json.gitstub | 1 - sled-agent/api/src/lib.rs | 24 +----------- .../src/add_attached_subnets/instance.rs | 14 ------- .../two_types_of_delegated_zvol/instance.rs | 37 ------------------- 4 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-18.0.0-93d4c3.json.gitstub diff --git a/openapi/sled-agent/sled-agent-18.0.0-93d4c3.json.gitstub b/openapi/sled-agent/sled-agent-18.0.0-93d4c3.json.gitstub deleted file mode 100644 index 550e5098efe..00000000000 --- a/openapi/sled-agent/sled-agent-18.0.0-93d4c3.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -16c22eb154598b1b40f5ac73cbc2183219b4c133:openapi/sled-agent/sled-agent-18.0.0-93d4c3.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 1194c25758d..c243def8a24 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -20,7 +20,7 @@ use omicron_common::api::internal::{ }, }; use sled_agent_types_versions::{ - latest, v1, v11, v14, v16, v17, v18, v20, v22, + latest, v1, v11, v14, v16, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; @@ -72,7 +72,6 @@ api_versions!([ (21, REMOVE_DISK_PUT), (20, BGP_V6), (19, ADD_ROT_ATTESTATION), - (18, ADD_ATTACHED_SUBNETS), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -466,8 +465,7 @@ pub trait SledAgentApi { operation_id = "vmm_register", method = PUT, path = "/vmms/{propolis_id}", - versions = - VERSION_ADD_ATTACHED_SUBNETS..VERSION_ADD_VSOCK_COMPONENT + versions = ..VERSION_ADD_VSOCK_COMPONENT }] async fn vmm_register_v18( rqctx: RequestContext, @@ -477,20 +475,6 @@ pub trait SledAgentApi { Self::vmm_register_v29(rqctx, path_params, body.map(Into::into)).await } - #[endpoint { - operation_id = "vmm_register", - method = PUT, - path = "/vmms/{propolis_id}", - versions = ..VERSION_ADD_ATTACHED_SUBNETS - }] - async fn vmm_register_v17( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - Self::vmm_register_v18(rqctx, path_params, body.map(Into::into)).await - } - #[endpoint { method = DELETE, path = "/vmms/{propolis_id}" @@ -1508,7 +1492,6 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/vmms/{propolis_id}/attached-subnets", - versions = VERSION_ADD_ATTACHED_SUBNETS.., }] async fn vmm_put_attached_subnets( request_context: RequestContext, @@ -1520,7 +1503,6 @@ pub trait SledAgentApi { #[endpoint { method = DELETE, path = "/vmms/{propolis_id}/attached-subnets", - versions = VERSION_ADD_ATTACHED_SUBNETS.., }] async fn vmm_delete_attached_subnets( request_context: RequestContext, @@ -1531,7 +1513,6 @@ pub trait SledAgentApi { #[endpoint { method = POST, path = "/vmms/{propolis_id}/attached-subnets", - versions = VERSION_ADD_ATTACHED_SUBNETS.., }] async fn vmm_post_attached_subnet( request_context: RequestContext, @@ -1543,7 +1524,6 @@ pub trait SledAgentApi { #[endpoint { method = DELETE, path = "/vmms/{propolis_id}/attached-subnets/{subnet}", - versions = VERSION_ADD_ATTACHED_SUBNETS.., }] async fn vmm_delete_attached_subnet( request_context: RequestContext, diff --git a/sled-agent/types/versions/src/add_attached_subnets/instance.rs b/sled-agent/types/versions/src/add_attached_subnets/instance.rs index e226b32374c..aabef85da32 100644 --- a/sled-agent/types/versions/src/add_attached_subnets/instance.rs +++ b/sled-agent/types/versions/src/add_attached_subnets/instance.rs @@ -69,20 +69,6 @@ pub struct InstanceSledLocalConfig { pub delegated_zvols: Vec, } -impl From for InstanceEnsureBody { - fn from(v17: v17::instance::InstanceEnsureBody) -> InstanceEnsureBody { - InstanceEnsureBody { - vmm_spec: v17.vmm_spec, - local_config: v17.local_config.into(), - vmm_runtime: v17.vmm_runtime, - instance_id: v17.instance_id, - migration_id: v17.migration_id, - propolis_addr: v17.propolis_addr, - metadata: v17.metadata, - } - } -} - impl From for InstanceSledLocalConfig { fn from( v17: v17::instance::InstanceSledLocalConfig, diff --git a/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs b/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs index f7a25a3af04..2692c3e43e4 100644 --- a/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs +++ b/sled-agent/types/versions/src/two_types_of_delegated_zvol/instance.rs @@ -2,20 +2,13 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use std::net::SocketAddr; - use omicron_common::api::external::Hostname; use omicron_common::api::internal::shared::DelegatedZvol; use omicron_common::api::internal::shared::DhcpConfig; -use omicron_uuid_kinds::InstanceUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use uuid::Uuid; -use crate::v1::instance::InstanceMetadata; -use crate::v1::instance::VmmRuntimeState; -use crate::v1::instance::VmmSpec; use crate::v7::instance::InstanceMulticastMembership; use crate::v9; use crate::v10::instance::ResolvedVpcFirewallRule; @@ -23,36 +16,6 @@ use crate::v10::inventory::NetworkInterface; use crate::v11; use crate::v11::instance::ExternalIpConfig; -/// The body of a request to ensure that a instance and VMM are known to a sled -/// agent. -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct InstanceEnsureBody { - /// The virtual hardware configuration this virtual machine should have when - /// it is started. - pub vmm_spec: VmmSpec, - - /// Information about the sled-local configuration that needs to be - /// established to make the VM's virtual hardware fully functional. - pub local_config: InstanceSledLocalConfig, - - /// The initial VMM runtime state for the VMM being registered. - pub vmm_runtime: VmmRuntimeState, - - /// The ID of the instance for which this VMM is being created. - pub instance_id: InstanceUuid, - - /// The ID of the migration in to this VMM, if this VMM is being - /// ensured is part of a migration in. If this is `None`, the VMM is not - /// being created due to a migration. - pub migration_id: Option, - - /// The address at which this VMM should serve a Propolis server API. - pub propolis_addr: SocketAddr, - - /// Metadata used to track instance statistics. - pub metadata: InstanceMetadata, -} - /// Describes sled-local configuration that a sled-agent must establish to make /// the instance's virtual hardware fully functional. #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] From 61dfc9cbda567e06317ae08ec328e72e70c99ef7 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 16:20:26 +0000 Subject: [PATCH 19/34] remove up to sled-agent api version 20 --- openapi/sled-agent/sled-agent-19.0.0-c56f15.json.gitstub | 1 - sled-agent/api/src/lib.rs | 4 ---- 2 files changed, 5 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-19.0.0-c56f15.json.gitstub diff --git a/openapi/sled-agent/sled-agent-19.0.0-c56f15.json.gitstub b/openapi/sled-agent/sled-agent-19.0.0-c56f15.json.gitstub deleted file mode 100644 index 343f6422452..00000000000 --- a/openapi/sled-agent/sled-agent-19.0.0-c56f15.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -becbbb616f5f18b59cc42e511c148734c2ba3831:openapi/sled-agent/sled-agent-19.0.0-c56f15.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index c243def8a24..860691d3bc6 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -71,7 +71,6 @@ api_versions!([ (22, REMOVE_HEALTH_MONITOR_KEEP_CHECKS), (21, REMOVE_DISK_PUT), (20, BGP_V6), - (19, ADD_ROT_ATTESTATION), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -1534,7 +1533,6 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/rot/{rot}/measurement-log", - versions = VERSION_ADD_ROT_ATTESTATION.., }] async fn rot_measurement_log( request_context: RequestContext, @@ -1545,7 +1543,6 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/rot/{rot}/certificate-chain", - versions = VERSION_ADD_ROT_ATTESTATION.., }] async fn rot_certificate_chain( request_context: RequestContext, @@ -1556,7 +1553,6 @@ pub trait SledAgentApi { #[endpoint { method = POST, path = "/rot/{rot}/attest", - versions = VERSION_ADD_ROT_ATTESTATION.., }] async fn rot_attest( request_context: RequestContext, From 8a9bcadbe6fff89c140a100cc0111fdcb5d83a31 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 16:49:25 +0000 Subject: [PATCH 20/34] remove up to sled-agent api version 21 --- .../sled-agent-20.0.0-fb6298.json.gitstub | 1 - sled-agent/api/src/lib.rs | 61 +------- sled-agent/src/http_entrypoints.rs | 29 +--- sled-agent/src/sim/http_entrypoints.rs | 15 -- .../versions/src/bgp_v6/early_networking.rs | 142 ------------------ .../types/versions/src/bgp_v6/uplink.rs | 18 --- .../versions/src/initial/early_networking.rs | 38 ----- sled-agent/types/versions/src/initial/mod.rs | 1 - .../types/versions/src/initial/uplink.rs | 30 ---- 9 files changed, 4 insertions(+), 331 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-20.0.0-fb6298.json.gitstub delete mode 100644 sled-agent/types/versions/src/initial/uplink.rs diff --git a/openapi/sled-agent/sled-agent-20.0.0-fb6298.json.gitstub b/openapi/sled-agent/sled-agent-20.0.0-fb6298.json.gitstub deleted file mode 100644 index 69c848f2c6b..00000000000 --- a/openapi/sled-agent/sled-agent-20.0.0-fb6298.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -4a456c997977e03d2e0c85fcb8c590514418b695:openapi/sled-agent/sled-agent-20.0.0-fb6298.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 860691d3bc6..04e76fe9536 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -70,7 +70,6 @@ api_versions!([ (23, REMOVE_READ_BOOTSTORE_CONFIG_CACHE), (22, REMOVE_HEALTH_MONITOR_KEEP_CHECKS), (21, REMOVE_DISK_PUT), - (20, BGP_V6), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -711,7 +710,7 @@ pub trait SledAgentApi { #[endpoint { method = POST, path = "/switch-ports", - versions = VERSION_BGP_V6..VERSION_STRONGER_BGP_UNNUMBERED_TYPES, + versions = ..VERSION_STRONGER_BGP_UNNUMBERED_TYPES, }] async fn uplink_ensure_v20( rqctx: RequestContext, @@ -729,18 +728,6 @@ pub trait SledAgentApi { .await } - #[endpoint { - method = POST, - path = "/switch-ports", - versions = ..VERSION_BGP_V6, - }] - async fn uplink_ensure_v1( - rqctx: RequestContext, - body: TypedBody, - ) -> Result { - Self::uplink_ensure_v20(rqctx, body.map(From::from)).await - } - /// This API endpoint is only reading the local sled agent's view of the /// bootstore. The boostore is a distributed data store that is eventually /// consistent. Reads from individual nodes may not represent the latest state. @@ -751,7 +738,7 @@ pub trait SledAgentApi { #[endpoint { method = GET, path = "/network-bootstore-config", - versions = VERSION_BGP_V6..VERSION_REMOVE_READ_BOOTSTORE_CONFIG_CACHE, + versions = ..VERSION_REMOVE_READ_BOOTSTORE_CONFIG_CACHE, }] async fn read_network_bootstore_config_cache( rqctx: RequestContext, @@ -760,35 +747,6 @@ pub trait SledAgentApi { HttpError, >; - /// This API endpoint is only reading the local sled agent's view of the - /// bootstore. The boostore is a distributed data store that is eventually - /// consistent. Reads from individual nodes may not represent the latest state. - #[endpoint { - method = GET, - path = "/network-bootstore-config", - versions = ..VERSION_BGP_V6, - }] - async fn read_network_bootstore_config_cache_v1( - rqctx: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - > { - let result: v1::early_networking::EarlyNetworkConfig = - Self::read_network_bootstore_config_cache(rqctx) - .await? - .0 - .try_into() - .map_err(|e| { - HttpError::for_bad_request( - None, - format!("error getting v1 config: {e}"), - ) - })?; - - Ok(HttpResponseOk(result)) - } - // ------------------------------------------------------------------------- // WARNING WARNING WARNING // @@ -945,7 +903,7 @@ pub trait SledAgentApi { #[endpoint { method = PUT, path = "/network-bootstore-config", - versions = VERSION_BGP_V6..VERSION_BOOTSTORE_VERSIONING, + versions = ..VERSION_BOOTSTORE_VERSIONING, operation_id = "write_network_bootstore_config", }] async fn write_network_bootstore_config_v20( @@ -953,19 +911,6 @@ pub trait SledAgentApi { body: TypedBody, ) -> Result; - // As described above, this must not forward to newer versions; sled-agent - // must implement this by faithfully serializing the requested version. - #[endpoint { - method = PUT, - path = "/network-bootstore-config", - versions = ..VERSION_BGP_V6, - operation_id = "write_network_bootstore_config", - }] - async fn write_network_bootstore_config_v1( - rqctx: RequestContext, - body: TypedBody, - ) -> Result; - /// Add a sled to a rack that was already initialized via RSS #[endpoint { method = PUT, diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index 6529d71c94d..271856d113c 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -78,9 +78,7 @@ use trust_quorum_types::messages::{ use trust_quorum_types::status::{CommitStatus, CoordinatorStatus, NodeStatus}; // Fixed identifiers for prior versions only -use sled_agent_types_versions::{ - v1, v20, v25, v26, v30, v33, v39, v42, v47, v48, -}; +use sled_agent_types_versions::{v20, v25, v26, v30, v33, v39, v42, v47, v48}; use sled_diagnostics::{ SledDiagnosticsCommandHttpOutput, SledDiagnosticsQueryOutput, }; @@ -1181,31 +1179,6 @@ impl SledAgentApi for SledAgentImpl { Ok(HttpResponseUpdatedNoContent()) } - // As explained in `sled-agent-api`, we must faithfully implement old - // versions of `write_network_bootstore_config()` _without_ upconverting the - // request into the latest bootstore `NetworkConfig` we understand. - async fn write_network_bootstore_config_v1( - rqctx: RequestContext, - body: TypedBody, - ) -> Result { - let sa = rqctx.context(); - let config = body.into_inner(); - sa.latencies() - .instrument_dropshot_handler(&rqctx, async { - let bs = sa.bootstore(); - bs.update_network_config(NetworkConfig::from(config)) - .await - .map_err(|e| { - HttpError::for_internal_error(format!( - "failed to write updated config to boot store: {}", - InlineErrorChain::new(&e) - )) - })?; - Ok(HttpResponseUpdatedNoContent()) - }) - .await - } - async fn sled_add( rqctx: RequestContext, body: TypedBody, diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index 802aeee45f4..566e83f9db9 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -81,8 +81,6 @@ use sled_agent_types::zone_bundle::{ ZoneBundleFilter, ZoneBundleId, ZoneBundleMetadata, ZonePathParam, }; use sled_hardware_types::BaseboardId; -// Fixed identifiers for prior versions only -use sled_agent_types_versions::v1; use sled_agent_types_versions::v20; use sled_agent_types_versions::v25; use sled_agent_types_versions::v26; @@ -564,19 +562,6 @@ impl SledAgentApi for SledAgentSimImpl { )) } - async fn write_network_bootstore_config_v1( - _rqctx: RequestContext, - _body: TypedBody, - ) -> Result { - // Real sled-agent has to support this endpoint for backwards - // compatibility during an update; sim-sled-agent doesn't. - Err(HttpError::for_bad_request( - None, - "old bootstore APIs not supported in simulated sled-agent" - .to_string(), - )) - } - /// Fetch basic information about this sled async fn inventory( rqctx: RequestContext, diff --git a/sled-agent/types/versions/src/bgp_v6/early_networking.rs b/sled-agent/types/versions/src/bgp_v6/early_networking.rs index 890c66bb1ee..60778b4dcf3 100644 --- a/sled-agent/types/versions/src/bgp_v6/early_networking.rs +++ b/sled-agent/types/versions/src/bgp_v6/early_networking.rs @@ -10,7 +10,6 @@ use oxnet::{IpNet, Ipv6Net}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::net::IpAddr; -use std::net::Ipv6Addr; use std::num::NonZeroU8; /// Network configuration required to bring up the control plane @@ -58,147 +57,6 @@ pub enum ConversionError { NotIpv4Net { field: String, net: oxnet::IpNet }, } -impl TryFrom for v1::EarlyNetworkConfig { - type Error = ConversionError; - - fn try_from(value: EarlyNetworkConfig) -> Result { - let rack_network_config = value - .body - .rack_network_config - .map(|v2_config| { - let ports = v2_config - .ports - .into_iter() - .map(|p| { - let bgp_peers = p - .bgp_peers - .into_iter() - .map(|peer| { - let addr = match peer.addr { - IpAddr::V4(v4) => Ok(v4), - other => { - let err = ConversionError::NotIpv4 { - field: "BgpPeerConfig.addr".into(), - addr: other, - }; - Err(err) - } - }?; - Ok(v1::BgpPeerConfig { - asn: peer.asn, - port: peer.port, - addr, - hold_time: peer.hold_time, - idle_hold_time: peer.idle_hold_time, - delay_open: peer.delay_open, - connect_retry: peer.connect_retry, - keepalive: peer.keepalive, - remote_asn: peer.remote_asn, - min_ttl: peer.min_ttl, - md5_auth_key: peer.md5_auth_key, - multi_exit_discriminator: peer - .multi_exit_discriminator, - communities: peer.communities, - local_pref: peer.local_pref, - enforce_first_as: peer.enforce_first_as, - allowed_import: peer.allowed_import, - allowed_export: peer.allowed_export, - vlan_id: peer.vlan_id, - }) - }) - .collect::, _>>()?; - - Ok(v1::PortConfig { - routes: p.routes, - addresses: p - .addresses - .into_iter() - .map(|a| v1::UplinkAddressConfig { - address: a.address.unwrap_or_else(|| { - IpNet::host_net(IpAddr::V6( - Ipv6Addr::UNSPECIFIED, - )) - }), - vlan_id: a.vlan_id, - }) - .collect(), - switch: p.switch, - port: p.port, - uplink_port_speed: p.uplink_port_speed, - uplink_port_fec: p.uplink_port_fec, - bgp_peers, - autoneg: p.autoneg, - lldp: p.lldp, - tx_eq: p.tx_eq, - }) - }) - .collect::, _>>()?; - - let infra_ip_first = match v2_config.infra_ip_first { - IpAddr::V4(ipv4_addr) => Ok(ipv4_addr), - _ => Err(ConversionError::NotIpv4 { - field: "RackNetworkConfig.infra_ip_first".into(), - addr: v2_config.infra_ip_first, - }), - }?; - - let infra_ip_last = match v2_config.infra_ip_last { - IpAddr::V4(ipv4_addr) => Ok(ipv4_addr), - _ => Err(ConversionError::NotIpv4 { - field: "RackNetworkConfig.infra_ip_last".into(), - addr: v2_config.infra_ip_last, - }), - }?; - - let mut bgp = vec![]; - - for bgp_config in v2_config.bgp { - let mut originate = vec![]; - - for prefix in bgp_config.originate { - match prefix { - IpNet::V4(ipv4_net) => { - originate.push(ipv4_net); - Ok(()) - } - _ => Err(ConversionError::NotIpv4Net { - field: "BgpConfig.originate".into(), - net: prefix, - }), - }? - } - let converted_config = v1::BgpConfig { - asn: bgp_config.asn, - originate, - shaper: bgp_config.shaper, - checker: bgp_config.checker, - }; - - bgp.push(converted_config); - } - - Ok(v1::RackNetworkConfig { - rack_subnet: v2_config.rack_subnet, - infra_ip_first, - infra_ip_last, - ports, - bgp, - bfd: v2_config.bfd, - }) - }) - .transpose()?; - - Ok(Self { - generation: value.generation, - schema_version: value.schema_version, - body: v1::EarlyNetworkConfigBody { - ntp_servers: value.body.ntp_servers, - rack_network_config, - }, - }) - } -} - /// This is the actual configuration of EarlyNetworking. /// /// We nest it below the "header" of `generation` and `schema_version` so that diff --git a/sled-agent/types/versions/src/bgp_v6/uplink.rs b/sled-agent/types/versions/src/bgp_v6/uplink.rs index 3146ae3cccc..7d0994bea9d 100644 --- a/sled-agent/types/versions/src/bgp_v6/uplink.rs +++ b/sled-agent/types/versions/src/bgp_v6/uplink.rs @@ -5,7 +5,6 @@ //! Uplink-related types for the Sled Agent API. use super::early_networking::UplinkAddressConfig; -use crate::v1; use crate::v1::early_networking::LldpPortConfig; use crate::v1::early_networking::TxEqConfig; use schemars::JsonSchema; @@ -17,12 +16,6 @@ pub struct SwitchPorts { pub uplinks: Vec, } -impl From for SwitchPorts { - fn from(value: v1::uplink::SwitchPorts) -> Self { - Self { uplinks: value.uplinks.into_iter().map(From::from).collect() } - } -} - #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)] pub struct HostPortConfig { /// Switchport to use for external connectivity @@ -36,14 +29,3 @@ pub struct HostPortConfig { pub tx_eq: Option, } - -impl From for HostPortConfig { - fn from(value: v1::uplink::HostPortConfig) -> Self { - Self { - port: value.port, - addrs: value.addrs.into_iter().map(From::from).collect(), - lldp: value.lldp, - tx_eq: value.tx_eq, - } - } -} diff --git a/sled-agent/types/versions/src/initial/early_networking.rs b/sled-agent/types/versions/src/initial/early_networking.rs index 25f108dbff4..29a0a56e689 100644 --- a/sled-agent/types/versions/src/initial/early_networking.rs +++ b/sled-agent/types/versions/src/initial/early_networking.rs @@ -4,49 +4,11 @@ //! Types for network setup required to bring up the control plane. -use bootstore::schemes::v0 as bootstore; use oxnet::{IpNet, Ipv4Net, Ipv6Net}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::net::{IpAddr, Ipv4Addr}; -/// Network configuration required to bring up the control plane -/// -/// The fields in this structure are those from -/// `RackInitializeRequest` necessary for use beyond RSS. -/// This is just for the initial rack configuration and cold boot purposes. -/// Updates come from Nexus. -#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)] -pub struct EarlyNetworkConfig { - // The current generation number of data as stored in CRDB. - // The initial generation is set during RSS time and then only mutated - // by Nexus. - pub generation: u64, - - // Which version of the data structure do we have. This is to help with - // deserialization and conversion in future updates. - pub schema_version: u32, - - // The actual configuration details - pub body: EarlyNetworkConfigBody, -} - -impl From for bootstore::NetworkConfig { - fn from(value: EarlyNetworkConfig) -> Self { - // We're serializing in-memory; this can only fail if - // `EarlyNetworkConfig` contains types that can't be represented as - // JSON, which (a) should never happen and (b) we should catch - // immediately in tests. - let blob = serde_json::to_vec(&value) - .expect("EarlyNetworkConfig can always be serialized as JSON"); - - // Yes this is duplicated, but that seems fine. - let generation = value.generation; - - bootstore::NetworkConfig { generation, blob } - } -} - /// This is the actual configuration of EarlyNetworking. /// /// We nest it below the "header" of `generation` and `schema_version` so that diff --git a/sled-agent/types/versions/src/initial/mod.rs b/sled-agent/types/versions/src/initial/mod.rs index 65f47e8bcb7..675a1cd4e06 100644 --- a/sled-agent/types/versions/src/initial/mod.rs +++ b/sled-agent/types/versions/src/initial/mod.rs @@ -13,5 +13,4 @@ pub mod instance; pub mod inventory; pub mod sled; pub mod support_bundle; -pub mod uplink; pub mod zone_bundle; diff --git a/sled-agent/types/versions/src/initial/uplink.rs b/sled-agent/types/versions/src/initial/uplink.rs deleted file mode 100644 index fb38e0f8fe7..00000000000 --- a/sled-agent/types/versions/src/initial/uplink.rs +++ /dev/null @@ -1,30 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -//! Uplink-related types for the Sled Agent API. - -use super::early_networking::LldpPortConfig; -use super::early_networking::TxEqConfig; -use super::early_networking::UplinkAddressConfig; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -/// A set of switch uplinks. -#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] -pub struct SwitchPorts { - pub uplinks: Vec, -} - -#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)] -pub struct HostPortConfig { - /// Switchport to use for external connectivity - pub port: String, - - /// 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. - pub addrs: Vec, - - pub lldp: Option, - pub tx_eq: Option, -} From a735ed0168669f3fa45ca3e088c6ad7f4c4e7abd Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 18:52:23 +0000 Subject: [PATCH 21/34] remove up to sled-agent api version 22 --- .../sled-agent-21.0.0-f22cee.json.gitstub | 1 - sled-agent/api/src/lib.rs | 13 -- sled-agent/src/common/disk.rs | 173 ------------------ sled-agent/src/http_entrypoints.rs | 25 --- sled-agent/src/sim/http_entrypoints.rs | 20 -- sled-agent/src/sim/sled_agent.rs | 11 -- sled-agent/src/sled_agent.rs | 15 -- sled-agent/types/versions/src/impls/disk.rs | 13 -- sled-agent/types/versions/src/initial/disk.rs | 28 --- sled-agent/types/versions/src/latest.rs | 3 - 10 files changed, 302 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-21.0.0-f22cee.json.gitstub diff --git a/openapi/sled-agent/sled-agent-21.0.0-f22cee.json.gitstub b/openapi/sled-agent/sled-agent-21.0.0-f22cee.json.gitstub deleted file mode 100644 index 32ce909730a..00000000000 --- a/openapi/sled-agent/sled-agent-21.0.0-f22cee.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -d3ef1db023bfbaf8fa1ac559809b58b795b703f7:openapi/sled-agent/sled-agent-21.0.0-f22cee.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 04e76fe9536..85c569233df 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -13,7 +13,6 @@ use dropshot::{ }; use dropshot_api_manager_types::api_versions; use omicron_common::api::internal::{ - nexus::DiskRuntimeState, shared::{ ExternalIpGatewayMap, ResolvedVpcRouteSet, ResolvedVpcRouteState, SledIdentifiers, VirtualNetworkInterfaceHost, @@ -69,7 +68,6 @@ api_versions!([ (24, ADD_ZPOOL_HEALTH_TO_INVENTORY), (23, REMOVE_READ_BOOTSTORE_CONFIG_CACHE), (22, REMOVE_HEALTH_MONITOR_KEEP_CHECKS), - (21, REMOVE_DISK_PUT), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -544,17 +542,6 @@ pub trait SledAgentApi { body: TypedBody, ) -> Result; - #[endpoint { - method = PUT, - path = "/disks/{disk_id}", - versions = ..VERSION_REMOVE_DISK_PUT, - }] - async fn disk_put( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError>; - #[endpoint { method = GET, path = "/artifacts-config" diff --git a/sled-agent/src/common/disk.rs b/sled-agent/src/common/disk.rs index cec63d745e6..56cbdf2e142 100644 --- a/sled-agent/src/common/disk.rs +++ b/sled-agent/src/common/disk.rs @@ -4,11 +4,6 @@ //! Describes the states of network-attached storage. -use chrono::Utc; -use omicron_common::api::external::DiskState; -use omicron_common::api::external::Error; -use omicron_common::api::internal::nexus::DiskRuntimeState; -use sled_agent_types::disk::DiskStateRequested; use uuid::Uuid; /// Action to be taken on behalf of state transition. @@ -18,171 +13,3 @@ pub enum Action { Detach(Uuid), Destroy, } - -/// The disk state is a combination of the last-known state, as well as an -/// "objective" state which the sled agent will work towards achieving. -#[derive(Clone, Debug)] -pub struct DiskStates { - current: DiskRuntimeState, - desired: Option, -} - -impl DiskStates { - pub fn new(current: DiskRuntimeState) -> Self { - DiskStates { current, desired: None } - } - - /// Returns the current disk state. - pub fn current(&self) -> &DiskRuntimeState { - &self.current - } - - /// Returns the desired disk state, if any exists. - pub fn desired(&self) -> &Option { - &self.desired - } - - /// Update the known state of a disk based on an observed state from - /// Propolis. - pub fn observe_transition( - &mut self, - observed: &DiskState, - ) -> Option { - self.transition(observed.clone(), None); - None - } - - /// Attempts to move from the current state to the requested "target" state. - /// - /// On success, returns the action, if any, which is necessary to carry - /// out this state transition. - pub fn request_transition( - &mut self, - target: &DiskStateRequested, - ) -> Result, Error> { - match target { - DiskStateRequested::Detached => self.request_detach(), - DiskStateRequested::Attached(uuid) => self.request_attach(*uuid), - DiskStateRequested::Destroyed => self.request_destroy(), - DiskStateRequested::Faulted => self.request_fault(), - } - } - - // Transitions to a new DiskState value, updating the timestamp and - // generation number. - // - // This transition always succeeds. - fn transition( - &mut self, - next: DiskState, - desired: Option, - ) { - // TODO: Deal with no-op transition? - self.current = DiskRuntimeState { - disk_state: next, - generation: self.current.generation.next(), - time_updated: Utc::now(), - }; - self.desired = desired; - } - - fn request_detach(&mut self) -> Result, Error> { - match self.current.disk_state { - // Already detached or can detach immediately. - DiskState::Creating | DiskState::Detached => { - self.transition(DiskState::Detached, None); - return Ok(None); - } - // Currently attached - enter detached through detaching. - DiskState::Attaching(uuid) - | DiskState::Attached(uuid) - | DiskState::Detaching(uuid) => { - self.transition( - DiskState::Detaching(uuid), - Some(DiskStateRequested::Detached), - ); - return Ok(Some(Action::Detach(uuid))); - } - // Cannot detach. - DiskState::Finalizing - | DiskState::Maintenance - | DiskState::ImportReady - | DiskState::ImportingFromUrl - | DiskState::ImportingFromBulkWrites - | DiskState::Destroyed - | DiskState::Faulted => { - return Err(Error::invalid_request(format!( - "cannot detach from {}", - self.current.disk_state - ))); - } - }; - } - - fn request_attach(&mut self, uuid: Uuid) -> Result, Error> { - match self.current.disk_state { - // Currently attached - only legal to attach to current ID - // (which is a no-op anyway). - DiskState::Attaching(id) | DiskState::Attached(id) => { - if uuid != id { - return Err(Error::invalid_request( - "disk is already attached", - )); - } - return Ok(None); - } - // Not attached - enter attached through attaching. - DiskState::Creating | DiskState::Detached => { - self.transition( - DiskState::Attaching(uuid), - Some(DiskStateRequested::Attached(uuid)), - ); - return Ok(Some(Action::Attach(uuid))); - } - // Cannot attach. - DiskState::Finalizing - | DiskState::Maintenance - | DiskState::ImportReady - | DiskState::ImportingFromUrl - | DiskState::ImportingFromBulkWrites - | DiskState::Detaching(_) - | DiskState::Destroyed - | DiskState::Faulted => { - return Err(Error::invalid_request(format!( - "cannot attach from {}", - self.current.disk_state - ))); - } - } - } - - fn request_destroy(&mut self) -> Result, Error> { - if self.current.disk_state.is_attached() { - let id = *self.current.disk_state.attached_instance_id().unwrap(); - self.transition( - DiskState::Detaching(id), - Some(DiskStateRequested::Destroyed), - ); - return Ok(Some(Action::Detach(id))); - } else { - self.transition(DiskState::Destroyed, None); - return Ok(Some(Action::Destroy)); - } - } - - fn request_fault(&mut self) -> Result, Error> { - if self.current.disk_state.is_attached() { - let id = *self.current.disk_state.attached_instance_id().unwrap(); - self.transition( - DiskState::Detaching(id), - Some(DiskStateRequested::Faulted), - ); - return Ok(Some(Action::Detach(id))); - } else { - self.transition(DiskState::Faulted, None); - // Unlike "destroy", no action necessary to identify that - // the attached disk is now faulted. - return Ok(None); - } - } -} diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index 271856d113c..8055d223f36 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -17,7 +17,6 @@ use dropshot::{ Query, RequestContext, StreamingBody, TypedBody, }; use omicron_common::api::external::Error; -use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::api::internal::shared::{ ExternalIpGatewayMap, ResolvedVpcRouteSet, ResolvedVpcRouteState, SledIdentifiers, VirtualNetworkInterfaceHost, @@ -40,7 +39,6 @@ use sled_agent_types::debug::OperatorSwitchZonePolicy; use sled_agent_types::diagnostics::{ SledDiagnosticsLogsDownloadPathParam, SledDiagnosticsLogsDownloadQueryParam, }; -use sled_agent_types::disk::{DiskEnsureBody, DiskPathParam}; use sled_agent_types::early_networking::EarlyNetworkConfigEnvelope; use sled_agent_types::firewall_rules::VpcFirewallRulesEnsureBody; use sled_agent_types::instance::SledVmmState; @@ -727,29 +725,6 @@ impl SledAgentApi for SledAgentImpl { .await } - async fn disk_put( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - let sa = rqctx.context(); - let disk_id = path_params.into_inner().disk_id; - let body_args = body.into_inner(); - sa.latencies() - .instrument_dropshot_handler(&rqctx, async { - Ok(HttpResponseOk( - sa.disk_ensure( - disk_id, - body_args.initial_runtime.clone(), - body_args.target.clone(), - ) - .await - .map_err(|e| Error::from(e))?, - )) - }) - .await - } - async fn artifact_list( rqctx: RequestContext, ) -> Result, HttpError> { diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index 566e83f9db9..a341beb5580 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -24,7 +24,6 @@ use dropshot::RequestContext; use dropshot::StreamingBody; use dropshot::TypedBody; use dropshot::endpoint; -use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::api::internal::shared::ExternalIpGatewayMap; use omicron_common::api::internal::shared::SledIdentifiers; use omicron_common::api::internal::shared::VirtualNetworkInterfaceHost; @@ -51,7 +50,6 @@ use sled_agent_types::debug::OperatorSwitchZonePolicy; use sled_agent_types::diagnostics::{ SledDiagnosticsLogsDownloadPathParam, SledDiagnosticsLogsDownloadQueryParam, }; -use sled_agent_types::disk::{DiskEnsureBody, DiskPathParam}; use sled_agent_types::early_networking::EarlyNetworkConfigEnvelope; use sled_agent_types::firewall_rules::VpcFirewallRulesEnsureBody; use sled_agent_types::instance::SledVmmState; @@ -241,24 +239,6 @@ impl SledAgentApi for SledAgentSimImpl { Ok(HttpResponseUpdatedNoContent()) } - async fn disk_put( - rqctx: RequestContext, - path_params: Path, - body: TypedBody, - ) -> Result, HttpError> { - let sa = rqctx.context(); - let disk_id = path_params.into_inner().disk_id; - let body_args = body.into_inner(); - Ok(HttpResponseOk( - sa.disk_ensure( - disk_id, - body_args.initial_runtime.clone(), - body_args.target.clone(), - ) - .await?, - )) - } - async fn artifact_config_get( rqctx: RequestContext, ) -> Result, HttpError> { diff --git a/sled-agent/src/sim/sled_agent.rs b/sled-agent/src/sim/sled_agent.rs index f2a62aba68d..02869ea4422 100644 --- a/sled-agent/src/sim/sled_agent.rs +++ b/sled-agent/src/sim/sled_agent.rs @@ -26,7 +26,6 @@ use dropshot::HttpError; use futures::Stream; use iddqd::IdOrdMap; use omicron_common::api::external::{ByteCount, Error, ResourceType}; -use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::api::internal::shared::{ ResolvedVpcRoute, ResolvedVpcRouteSet, ResolvedVpcRouteState, RouterId, RouterKind, RouterVersion, VirtualNetworkInterfaceHost, @@ -47,7 +46,6 @@ use sled_agent_health_monitor::HealthMonitorHandle; use sled_agent_types::attached_subnet::{AttachedSubnet, AttachedSubnets}; use sled_agent_types::dataset::LocalStorageDatasetEnsureRequest; use sled_agent_types::disk::DiskIdentity; -use sled_agent_types::disk::DiskStateRequested; use sled_agent_types::disk::DiskVariant; use sled_agent_types::early_networking::EarlyNetworkConfigEnvelope; use sled_agent_types::early_networking::PortConfig; @@ -570,15 +568,6 @@ impl SledAgent { Ok(()) } - pub async fn disk_ensure( - self: &Arc, - _disk_id: Uuid, - _initial_state: DiskRuntimeState, - _target: DiskStateRequested, - ) -> Result { - unimplemented!("Disk attachment not yet implemented"); - } - pub fn artifact_store(&self) -> &ArtifactStore { self.repo_depot.app_private() } diff --git a/sled-agent/src/sled_agent.rs b/sled-agent/src/sled_agent.rs index eddacb3ba91..0e3db4b87a5 100644 --- a/sled-agent/src/sled_agent.rs +++ b/sled-agent/src/sled_agent.rs @@ -47,7 +47,6 @@ use omicron_common::address::{ Ipv6Subnet, SLED_PREFIX_LENGTH, get_sled_address, }; use omicron_common::api::external::{ByteCount, ByteCountRangeError, Vni}; -use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::api::internal::shared::DelegatedZvol; use omicron_common::api::internal::shared::{ ExternalIpGatewayMap, ResolvedVpcRouteSet, ResolvedVpcRouteState, @@ -78,7 +77,6 @@ use sled_agent_types::attached_subnet::AttachedSubnets; use sled_agent_types::dataset::LocalStorageDatasetDeleteRequest; use sled_agent_types::dataset::LocalStorageDatasetEnsureRequest; use sled_agent_types::disk::CompressionAlgorithm; -use sled_agent_types::disk::DiskStateRequested; use sled_agent_types::early_networking::EarlyNetworkConfigEnvelope; use sled_agent_types::instance::ResolvedVpcFirewallRule; use sled_agent_types::instance::{ @@ -1161,19 +1159,6 @@ impl SledAgent { .map_err(|e| Error::Instance(e)) } - /// Idempotently ensures that the given virtual disk is attached (or not) as - /// specified. - /// - /// NOTE: Not yet implemented. - pub async fn disk_ensure( - &self, - _disk_id: Uuid, - _initial_state: DiskRuntimeState, - _target: DiskStateRequested, - ) -> Result { - todo!("Disk attachment not yet implemented"); - } - pub fn artifact_store(&self) -> &ArtifactStore { &self.inner.repo_depot.app_private() } diff --git a/sled-agent/types/versions/src/impls/disk.rs b/sled-agent/types/versions/src/impls/disk.rs index 64b39c3fa9a..6f205bc757f 100644 --- a/sled-agent/types/versions/src/impls/disk.rs +++ b/sled-agent/types/versions/src/impls/disk.rs @@ -3,7 +3,6 @@ // file, You can obtain one at https://mozilla.org/MPL/2.0/. use crate::latest::disk::CompressionAlgorithm; -use crate::latest::disk::DiskStateRequested; use crate::latest::disk::DiskVariant; use crate::latest::disk::GzipLevel; use crate::latest::disk::M2Slot; @@ -12,18 +11,6 @@ use omicron_common::zpool_name::ZpoolKind; use std::fmt; use std::str::FromStr; -impl DiskStateRequested { - /// Returns whether the requested state is attached to an Instance or not. - pub fn is_attached(&self) -> bool { - match self { - DiskStateRequested::Detached => false, - DiskStateRequested::Destroyed => false, - DiskStateRequested::Faulted => false, - DiskStateRequested::Attached(_) => true, - } - } -} - impl M2Slot { /// Flip from `A` to `B` or vice versa. pub fn toggled(self) -> Self { diff --git a/sled-agent/types/versions/src/initial/disk.rs b/sled-agent/types/versions/src/initial/disk.rs index e0bf329b346..23e3010f82a 100644 --- a/sled-agent/types/versions/src/initial/disk.rs +++ b/sled-agent/types/versions/src/initial/disk.rs @@ -7,20 +7,12 @@ use iddqd::IdOrdItem; use iddqd::id_upcast; use omicron_common::api::external::ByteCount; -use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::disk::DatasetName; use omicron_uuid_kinds::DatasetUuid; use omicron_uuid_kinds::PhysicalDiskUuid; use omicron_uuid_kinds::ZpoolUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use uuid::Uuid; - -/// Path parameters for Disk requests. -#[derive(Deserialize, JsonSchema)] -pub struct DiskPathParam { - pub disk_id: Uuid, -} /// Information about a zpool. #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)] @@ -47,26 +39,6 @@ pub enum DiskVariant { M2, } -/// Sent from to a sled agent to establish the runtime state of a Disk -#[derive(Serialize, Deserialize, JsonSchema)] -pub struct DiskEnsureBody { - /// Last runtime state of the Disk known to Nexus (used if the agent has - /// never seen this Disk before). - pub initial_runtime: DiskRuntimeState, - /// requested runtime state of the Disk - pub target: DiskStateRequested, -} - -/// Used to request a Disk state change -#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize, JsonSchema)] -#[serde(rename_all = "lowercase", tag = "state", content = "instance")] -pub enum DiskStateRequested { - Detached, - Attached(Uuid), - Destroyed, - Faulted, -} - /// Describes an M.2 slot, often in the context of writing a system image to /// it. #[derive( diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index a4fcec95753..97635ed71f6 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -44,10 +44,7 @@ pub mod diagnostics { pub mod disk { pub use crate::v1::disk::CompressionAlgorithm; pub use crate::v1::disk::DatasetConfig; - pub use crate::v1::disk::DiskEnsureBody; pub use crate::v1::disk::DiskIdentity; - pub use crate::v1::disk::DiskPathParam; - pub use crate::v1::disk::DiskStateRequested; pub use crate::v1::disk::DiskVariant; pub use crate::v1::disk::GzipLevel; pub use crate::v1::disk::M2Slot; From f6492191a75a27ff05c9abff9ff8c5fedb20e984 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 19:15:32 +0000 Subject: [PATCH 22/34] remove up to sled-agent api version 23 --- .../sled-agent-22.0.0-c0f464.json.gitstub | 1 - sled-agent/api/src/lib.rs | 20 +------- .../measurement_proper_inventory/inventory.rs | 36 +------------- .../inventory.rs | 47 ------------------- 4 files changed, 4 insertions(+), 100 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-22.0.0-c0f464.json.gitstub diff --git a/openapi/sled-agent/sled-agent-22.0.0-c0f464.json.gitstub b/openapi/sled-agent/sled-agent-22.0.0-c0f464.json.gitstub deleted file mode 100644 index 261d46d52f2..00000000000 --- a/openapi/sled-agent/sled-agent-22.0.0-c0f464.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -3cb178f675b63ead216e5a39ccea28624486867d:openapi/sled-agent/sled-agent-22.0.0-c0f464.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 85c569233df..49f899ae2a0 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -19,7 +19,7 @@ use omicron_common::api::internal::{ }, }; use sled_agent_types_versions::{ - latest, v1, v11, v14, v16, v18, v20, v22, + latest, v1, v11, v14, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; @@ -67,7 +67,6 @@ api_versions!([ (25, BOOTSTORE_VERSIONING), (24, ADD_ZPOOL_HEALTH_TO_INVENTORY), (23, REMOVE_READ_BOOTSTORE_CONFIG_CACHE), - (22, REMOVE_HEALTH_MONITOR_KEEP_CHECKS), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -1056,7 +1055,7 @@ pub trait SledAgentApi { operation_id = "inventory", method = GET, path = "/inventory", - versions = VERSION_REMOVE_HEALTH_MONITOR_KEEP_CHECKS..VERSION_ADD_ZPOOL_HEALTH_TO_INVENTORY, + versions = ..VERSION_ADD_ZPOOL_HEALTH_TO_INVENTORY, }] async fn inventory_v22( rqctx: RequestContext, @@ -1066,21 +1065,6 @@ pub trait SledAgentApi { }) } - /// Fetch basic information about this sled - #[endpoint { - operation_id = "inventory", - method = GET, - path = "/inventory", - versions = ..VERSION_REMOVE_HEALTH_MONITOR_KEEP_CHECKS, - }] - async fn inventory_v16( - rqctx: RequestContext, - ) -> Result, HttpError> { - Self::inventory_v22(rqctx).await.map(|HttpResponseOk(inv)| { - HttpResponseOk(v16::inventory::Inventory::from(inv)) - }) - } - /// Fetch sled identifiers #[endpoint { method = GET, diff --git a/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs b/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs index 87628f8d55e..b03064a1ce9 100644 --- a/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs +++ b/sled-agent/types/versions/src/measurement_proper_inventory/inventory.rs @@ -2,54 +2,22 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use crate::v1::inventory::Baseboard; use camino::Utf8PathBuf; use iddqd::id_upcast; use iddqd::{IdOrdItem, IdOrdMap}; -use omicron_common::api::external::ByteCount; use omicron_uuid_kinds::PhysicalDiskUuid; -use omicron_uuid_kinds::SledUuid; use omicron_uuid_kinds::{DatasetUuid, OmicronZoneUuid}; use schemars::{ JsonSchema, SchemaGenerator, schema::Schema, schema::SchemaObject, }; use serde::{Deserialize, Serialize}; -use sled_hardware_types::SledCpuFamily; use std::collections::BTreeMap; -use std::net::SocketAddrV6; use crate::v1::inventory::{ - BootPartitionContents, ConfigReconcilerInventoryResult, InventoryDataset, - InventoryDisk, InventoryZpool, OrphanedDataset, + BootPartitionContents, ConfigReconcilerInventoryResult, OrphanedDataset, RemoveMupdateOverrideInventory, }; -use crate::v50::inventory::SledRole; -use crate::v14::inventory::{ - ConfigReconcilerInventoryStatus, HealthMonitorInventory, - OmicronFileSourceResolverInventory, OmicronSledConfig, -}; - -/// Identity and basic status information about this sled agent -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct Inventory { - pub sled_id: SledUuid, - pub sled_agent_address: SocketAddrV6, - pub sled_role: SledRole, - pub baseboard: Baseboard, - pub usable_hardware_threads: u32, - pub usable_physical_ram: ByteCount, - pub cpu_family: SledCpuFamily, - pub reservoir_size: ByteCount, - pub disks: Vec, - pub zpools: Vec, - pub datasets: Vec, - pub ledgered_sled_config: Option, - pub reconciler_status: ConfigReconcilerInventoryStatus, - pub last_reconciliation: Option, - pub file_source_resolver: OmicronFileSourceResolverInventory, - pub health_monitor: HealthMonitorInventory, - pub reference_measurements: IdOrdMap, -} +use crate::v14::inventory::OmicronSledConfig; /// Describes the last attempt made by the sled-agent-config-reconciler to /// reconcile the current sled config against the actual state of the sled. diff --git a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs index 6741e540f86..b02525602ff 100644 --- a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs +++ b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs @@ -19,10 +19,8 @@ use crate::v1::inventory::InventoryZpool; use crate::v50::inventory::SledRole; use crate::v12::inventory::SvcsInMaintenanceResult; use crate::v14::inventory::ConfigReconcilerInventoryStatus; -use crate::v14::inventory::HealthMonitorInventory; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; -use crate::v16; use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; @@ -51,48 +49,3 @@ pub struct Inventory { pub smf_services_in_maintenance: Result, pub reference_measurements: IdOrdMap, } - -impl From for v16::inventory::Inventory { - fn from(value: Inventory) -> Self { - let Inventory { - sled_id, - sled_agent_address, - sled_role, - baseboard, - usable_hardware_threads, - usable_physical_ram, - cpu_family, - reservoir_size, - disks, - zpools, - datasets, - ledgered_sled_config, - reconciler_status, - last_reconciliation, - file_source_resolver, - smf_services_in_maintenance, - reference_measurements, - } = value; - Self { - sled_id, - sled_agent_address, - sled_role, - baseboard, - usable_hardware_threads, - usable_physical_ram, - cpu_family, - reservoir_size, - disks, - zpools, - datasets, - ledgered_sled_config, - reconciler_status, - last_reconciliation, - file_source_resolver, - health_monitor: HealthMonitorInventory { - smf_services_in_maintenance, - }, - reference_measurements, - } - } -} From 3cc8c4f42ffb2e5b9a08ef09c0f096c20ffbd7ac Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 19:44:48 +0000 Subject: [PATCH 23/34] remove sled-agent api version 23 --- .../sled-agent-23.0.0-4cab57.json.gitstub | 1 - sled-agent/api/src/lib.rs | 20 ----- sled-agent/src/http_entrypoints.rs | 77 ------------------- sled-agent/src/sim/http_entrypoints.rs | 55 ------------- 4 files changed, 153 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-23.0.0-4cab57.json.gitstub diff --git a/openapi/sled-agent/sled-agent-23.0.0-4cab57.json.gitstub b/openapi/sled-agent/sled-agent-23.0.0-4cab57.json.gitstub deleted file mode 100644 index add2ded450f..00000000000 --- a/openapi/sled-agent/sled-agent-23.0.0-4cab57.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -7c10008923222e095463fdc38324e4f789cb7e3e:openapi/sled-agent/sled-agent-23.0.0-4cab57.json diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index 49f899ae2a0..c7a4d853eca 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -66,7 +66,6 @@ api_versions!([ (26, RACK_NETWORK_CONFIG_NOT_OPTIONAL), (25, BOOTSTORE_VERSIONING), (24, ADD_ZPOOL_HEALTH_TO_INVENTORY), - (23, REMOVE_READ_BOOTSTORE_CONFIG_CACHE), // Versions before this have been retired. We no longer support them in any // server, nor expect them from any client. ]); @@ -714,25 +713,6 @@ pub trait SledAgentApi { .await } - /// This API endpoint is only reading the local sled agent's view of the - /// bootstore. The boostore is a distributed data store that is eventually - /// consistent. Reads from individual nodes may not represent the latest state. - // THIS HAS BEEN REMOVED AND SHOULD NOT BE RESTORED. Reading from the - // bootstore cache is inherently racy; the bootstore is eventually - // consistent, and reads from different nodes may return different values. - // Instead, callers should read from CRDB. - #[endpoint { - method = GET, - path = "/network-bootstore-config", - versions = ..VERSION_REMOVE_READ_BOOTSTORE_CONFIG_CACHE, - }] - async fn read_network_bootstore_config_cache( - rqctx: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - >; - // ------------------------------------------------------------------------- // WARNING WARNING WARNING // diff --git a/sled-agent/src/http_entrypoints.rs b/sled-agent/src/http_entrypoints.rs index 8055d223f36..ae06f1ea808 100644 --- a/sled-agent/src/http_entrypoints.rs +++ b/sled-agent/src/http_entrypoints.rs @@ -895,83 +895,6 @@ impl SledAgentApi for SledAgentImpl { .await } - async fn read_network_bootstore_config_cache( - rqctx: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - > { - // This endpoint has been removed, so we're forever pinned to returning - // a `v20::early_networking::EarlyNetworkConfigBody`. If a new version - // of that type is added, we'll need to update this code to convert from - // the version we get back from `deserialize_from_bootstore()` into the - // v20 version we need. - // - // Use shorter names so rustfmt doesn't give up on this function. - use v20::early_networking::EarlyNetworkConfigBody as BodyV20; - use v26::early_networking::EarlyNetworkConfigBody as BodyV26; - use v30::early_networking::EarlyNetworkConfigBody as BodyV30; - use v33::system_networking::SystemNetworkingConfig as BodyV33; - use v39::system_networking::SystemNetworkingConfig as BodyV39; - use v42::system_networking::SystemNetworkingConfig as BodyV42; - use v47::system_networking::SystemNetworkingConfig as BodyV47; - type LatestEnvelope = EarlyNetworkConfigEnvelope; - - let sa = rqctx.context(); - sa.latencies() - .instrument_dropshot_handler(&rqctx, async { - let bs = sa.bootstore(); - - // It's a little awkward to create a new subscription - // (i.e., a new `watch::Receiver`) any time we receive this - // dropshot request, but this request is deprecated anyway so we - // don't expect it to be called in practice. - let config = bs.network_config_subscribe().borrow().clone(); - let config = match config { - Some(config) => { - let latest_version_body = - LatestEnvelope::deserialize_from_bootstore(&config) - .and_then(|envelope| { - envelope.deserialize_body() - }) - .map_err(|err| { - HttpError::for_internal_error(format!( - "failed to deserialize \ - early network config: {}", - InlineErrorChain::new(&err), - )) - })?; - let body_v42 = BodyV42::try_from(BodyV47::from( - latest_version_body, - )) - .map_err(|err| { - HttpError::for_internal_error(format!( - "failed to downconvert early network \ - config: {err:#}" - )) - })?; - let body = BodyV20::from(BodyV26::from(BodyV30::from( - BodyV33::from(BodyV39::from(body_v42)), - ))); - v20::early_networking::EarlyNetworkConfig { - generation: config.generation, - schema_version: BodyV20::SCHEMA_VERSION, - body, - } - } - None => { - return Err(HttpError::for_unavail( - None, - "early network config does not exist yet".into(), - )); - } - }; - - Ok(HttpResponseOk(config)) - }) - .await - } - async fn write_network_bootstore_config_v48( rqctx: RequestContext, body: TypedBody, diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index a341beb5580..a05b9373627 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -89,7 +89,6 @@ use sled_agent_types_versions::v42; use sled_agent_types_versions::v47; use sled_agent_types_versions::v48; use sled_diagnostics::SledDiagnosticsQueryOutput; -use slog_error_chain::InlineErrorChain; use std::collections::BTreeMap; use std::sync::Arc; use trust_quorum_types::messages::{ @@ -371,60 +370,6 @@ impl SledAgentApi for SledAgentSimImpl { Ok(HttpResponseOk(vnics)) } - async fn read_network_bootstore_config_cache( - rqctx: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - > { - // Read the current envelope, then convert it back down to the version - // we have to report for this (now-removed!) API endpoint. - use v20::early_networking::EarlyNetworkConfigBody as BodyV20; - use v26::early_networking::EarlyNetworkConfigBody as BodyV26; - use v30::early_networking::EarlyNetworkConfigBody as BodyV30; - use v33::system_networking::SystemNetworkingConfig as BodyV33; - use v39::system_networking::SystemNetworkingConfig as BodyV39; - use v42::system_networking::SystemNetworkingConfig as BodyV42; - use v47::system_networking::SystemNetworkingConfig as BodyV47; - - let config = - rqctx.context().bootstore_network_config.lock().unwrap().clone(); - - let envelope = - EarlyNetworkConfigEnvelope::deserialize_from_bootstore(&config) - .map_err(|err| { - HttpError::for_internal_error(format!( - "could not deserialize bootstore contents: {}", - InlineErrorChain::new(&err) - )) - })?; - let latest_version_body = - envelope.deserialize_body().map_err(|err| { - HttpError::for_internal_error(format!( - "could not deserialize early network config body: {}", - InlineErrorChain::new(&err) - )) - })?; - - // Downconvert from the current version to the v20 version we have to - // return from this endpoint. - let body_v42 = BodyV42::try_from(BodyV47::from(latest_version_body)) - .map_err(|err| { - HttpError::for_internal_error(format!( - "failed to downconvert early network config: {err:#}" - )) - })?; - let body = BodyV20::from(BodyV26::from(BodyV30::from(BodyV33::from( - BodyV39::from(body_v42), - )))); - - Ok(HttpResponseOk(v20::early_networking::EarlyNetworkConfig { - generation: config.generation, - schema_version: BodyV20::SCHEMA_VERSION, - body, - })) - } - async fn write_network_bootstore_config_v48( rqctx: RequestContext, body: TypedBody, From ca1910e8e4b572291ed57029e93e8748ee572a76 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 20:13:58 +0000 Subject: [PATCH 24/34] remove some missed stuff --- .../src/test_util/host_phase_2_test_state.rs | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs b/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs index 2bd9b306d14..cf2d408b945 100644 --- a/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs +++ b/nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs @@ -200,7 +200,6 @@ mod api_impl { use dropshot::StreamingBody; use dropshot::TypedBody; use iddqd::IdOrdMap; - use omicron_common::api::internal::nexus::DiskRuntimeState; use omicron_common::api::internal::shared::ExternalIpGatewayMap; use omicron_common::api::internal::shared::SledIdentifiers; use omicron_common::api::internal::shared::VirtualNetworkInterfaceHost; @@ -221,8 +220,6 @@ mod api_impl { use sled_agent_types::debug::OperatorSwitchZonePolicy; use sled_agent_types::diagnostics::SledDiagnosticsLogsDownloadPathParm; use sled_agent_types::diagnostics::SledDiagnosticsLogsDownloadQueryParam; - use sled_agent_types::disk::DiskEnsureBody; - use sled_agent_types::disk::DiskPathParam; use sled_agent_types::firewall_rules::VpcFirewallRulesEnsureBody; use sled_agent_types::instance::InstanceEnsureBody; use sled_agent_types::instance::InstanceExternalIpBody; @@ -251,7 +248,6 @@ mod api_impl { use sled_agent_types::inventory::OmicronSledConfig; use sled_agent_types::inventory::OmicronSledUpdateDisposition; use sled_agent_types::inventory::SledCpuFamily; - use sled_agent_types::inventory::SledRole; use sled_agent_types::inventory::SvcsEnabledNotOnlineResult; use sled_agent_types::probes::ProbeSet; use sled_agent_types::sled::AddSledRequest; @@ -270,7 +266,6 @@ mod api_impl { use sled_agent_types::zone_bundle::ZoneBundleId; use sled_agent_types::zone_bundle::ZoneBundleMetadata; use sled_agent_types::zone_bundle::ZonePathParam; - use sled_agent_types_versions::v1; use sled_agent_types_versions::v20; use sled_agent_types_versions::v25; use sled_agent_types_versions::v26; @@ -582,12 +577,6 @@ mod api_impl { unimplemented!() } - async fn sled_role_get_v1( - _rqctx: RequestContext, - ) -> Result, HttpError> { - unimplemented!() - } - async fn vmm_register( _rqctx: RequestContext, _path_params: Path, @@ -678,14 +667,6 @@ mod api_impl { } } - async fn disk_put( - _rqctx: RequestContext, - _path_params: Path, - _body: TypedBody, - ) -> Result, HttpError> { - unimplemented!() - } - async fn artifact_config_get( _rqctx: RequestContext, ) -> Result, HttpError> { @@ -766,15 +747,6 @@ mod api_impl { unimplemented!() } - async fn read_network_bootstore_config_cache( - _rqctx: RequestContext, - ) -> Result< - HttpResponseOk, - HttpError, - > { - unimplemented!() - } - async fn write_network_bootstore_config_v48( _rqctx: RequestContext, _body: TypedBody, @@ -838,13 +810,6 @@ mod api_impl { unimplemented!() } - async fn write_network_bootstore_config_v1( - _rqctx: RequestContext, - _body: TypedBody, - ) -> Result { - unimplemented!() - } - async fn sled_add( _rqctx: RequestContext, _body: TypedBody, From a912eed959bebe4e96fbbca6612ba0a1c3368884 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Fri, 28 Aug 2026 20:19:02 +0000 Subject: [PATCH 25/34] fmt and clippy --- sled-agent/api/src/lib.rs | 8 +++----- sled-agent/src/fakes/nexus.rs | 2 +- sled-agent/src/sim/http_entrypoints.rs | 2 +- .../add_dual_stack_external_ip_config/firewall_rules.rs | 2 +- .../types/versions/src/add_fmd_to_inventory/inventory.rs | 2 +- .../versions/src/add_update_disposition/inventory.rs | 2 +- .../src/add_zpool_health_to_inventory/inventory.rs | 2 +- .../versions/src/inventory_baseboard_id/inventory.rs | 2 +- sled-agent/types/versions/src/latest.rs | 4 ++-- sled-agent/types/versions/src/measurements/inventory.rs | 5 ++--- .../src/modify_services_in_inventory/inventory.rs | 2 +- .../src/modify_svc_enabled_not_online_state/inventory.rs | 2 +- .../types/versions/src/modify_svc_state_enum/inventory.rs | 2 +- .../types/versions/src/modify_svcs_types/inventory.rs | 2 +- .../src/remove_health_monitor_keep_checks/inventory.rs | 2 +- .../versions/src/retire_up_to_version_23/instance.rs | 1 - .../versions/src/retire_up_to_version_23/inventory.rs | 3 +-- .../types/versions/src/retire_up_to_version_23/mod.rs | 1 - 18 files changed, 20 insertions(+), 26 deletions(-) diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index c7a4d853eca..d176702e082 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -12,11 +12,9 @@ use dropshot::{ StreamingBody, TypedBody, }; use dropshot_api_manager_types::api_versions; -use omicron_common::api::internal::{ - shared::{ - ExternalIpGatewayMap, ResolvedVpcRouteSet, ResolvedVpcRouteState, - SledIdentifiers, VirtualNetworkInterfaceHost, - }, +use omicron_common::api::internal::shared::{ + ExternalIpGatewayMap, ResolvedVpcRouteSet, ResolvedVpcRouteState, + SledIdentifiers, VirtualNetworkInterfaceHost, }; use sled_agent_types_versions::{ latest, v1, v11, v14, v18, v20, v22, diff --git a/sled-agent/src/fakes/nexus.rs b/sled-agent/src/fakes/nexus.rs index 0e747485f1b..de59fc28d80 100644 --- a/sled-agent/src/fakes/nexus.rs +++ b/sled-agent/src/fakes/nexus.rs @@ -18,8 +18,8 @@ use omicron_common::api::external::Error; use omicron_uuid_kinds::{OmicronZoneUuid, PropolisUuid, SledUuid}; use schemars::JsonSchema; use serde::Deserialize; -use sled_agent_types_versions::v1::instance::SledVmmState; use sled_agent_types::instance::VmmPathParam; +use sled_agent_types_versions::v1::instance::SledVmmState; use transient_dns_server::TransientDnsServer; /// Implements a fake Nexus. diff --git a/sled-agent/src/sim/http_entrypoints.rs b/sled-agent/src/sim/http_entrypoints.rs index a05b9373627..f8b9725466b 100644 --- a/sled-agent/src/sim/http_entrypoints.rs +++ b/sled-agent/src/sim/http_entrypoints.rs @@ -78,7 +78,6 @@ use sled_agent_types::zone_bundle::{ BundleUtilization, CleanupContext, CleanupContextUpdate, CleanupCount, ZoneBundleFilter, ZoneBundleId, ZoneBundleMetadata, ZonePathParam, }; -use sled_hardware_types::BaseboardId; use sled_agent_types_versions::v20; use sled_agent_types_versions::v25; use sled_agent_types_versions::v26; @@ -89,6 +88,7 @@ use sled_agent_types_versions::v42; use sled_agent_types_versions::v47; use sled_agent_types_versions::v48; use sled_diagnostics::SledDiagnosticsQueryOutput; +use sled_hardware_types::BaseboardId; use std::collections::BTreeMap; use std::sync::Arc; use trust_quorum_types::messages::{ diff --git a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs index 6326fa80651..ebe29360686 100644 --- a/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs +++ b/sled-agent/types/versions/src/add_dual_stack_external_ip_config/firewall_rules.rs @@ -4,8 +4,8 @@ //! Firewall rule types for version `ADD_DUAL_STACK_EXTERNAL_IP_CONFIG`. -use crate::v10::instance::ResolvedVpcFirewallRule; use crate::v10; +use crate::v10::instance::ResolvedVpcFirewallRule; use omicron_common::api::external; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs index 271bae8395b..1cdbdc25246 100644 --- a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs @@ -15,7 +15,6 @@ use std::net::SocketAddrV6; use crate::v1::inventory::Baseboard; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -23,6 +22,7 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v37; +use crate::v50::inventory::SledRole; /// A diagnosed fault case from the illumos Fault Management Daemon on a sled. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, JsonSchema)] diff --git a/sled-agent/types/versions/src/add_update_disposition/inventory.rs b/sled-agent/types/versions/src/add_update_disposition/inventory.rs index 3eba814ecc9..8f0af152e3f 100644 --- a/sled-agent/types/versions/src/add_update_disposition/inventory.rs +++ b/sled-agent/types/versions/src/add_update_disposition/inventory.rs @@ -22,7 +22,6 @@ use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::OrphanedDataset; use crate::v1::inventory::RemoveMupdateOverrideInventory; use crate::v1::inventory::SledCpuFamily; -use crate::v50::inventory::SledRole; use crate::v11::inventory::OmicronZoneConfig; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSingleMeasurement; @@ -31,6 +30,7 @@ use crate::v24::inventory::InventoryZpool; use crate::v40::inventory::FmdInventory; use crate::v40::inventory::FmdInventoryError; use crate::v46::inventory::SvcsEnabledNotOnlineResult; +use crate::v50::inventory::SledRole; use chrono::DateTime; use chrono::Utc; use iddqd::IdOrdMap; diff --git a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs index a9bc3880a32..b4e5b8696e4 100644 --- a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs @@ -17,7 +17,6 @@ use std::net::SocketAddrV6; use crate::v1; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v50::inventory::SledRole; use crate::v12::inventory::SvcsInMaintenanceResult; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; @@ -25,6 +24,7 @@ use crate::v14::inventory::OmicronSledConfig; use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v22; +use crate::v50::inventory::SledRole; #[derive( Clone, diff --git a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs index 0f33a52401b..419241d22b6 100644 --- a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs +++ b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs @@ -15,7 +15,6 @@ use std::net::SocketAddrV6; use crate::v1::inventory::Baseboard; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -25,6 +24,7 @@ use crate::v24::inventory::InventoryZpool; use crate::v37::inventory::SvcsEnabledNotOnlineResult; use crate::v40; use crate::v40::inventory::{FmdInventory, FmdInventoryError}; +use crate::v50::inventory::SledRole; /// Identity and basic status information about this sled agent #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index 97635ed71f6..98f7cca3a3e 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -107,7 +107,6 @@ pub mod instance { pub use crate::v1::instance::VmmIssueDiskSnapshotRequestBody; pub use crate::v1::instance::VmmIssueDiskSnapshotRequestPathParam; pub use crate::v1::instance::VmmIssueDiskSnapshotRequestResponse; - pub use crate::v50::instance::VmmPathParam; pub use crate::v1::instance::VmmPutStateBody; pub use crate::v1::instance::VmmPutStateResponse; pub use crate::v1::instance::VmmRuntimeState; @@ -115,6 +114,7 @@ pub mod instance { pub use crate::v1::instance::VmmStateRequested; pub use crate::v1::instance::VmmUnregisterResponse; pub use crate::v1::instance::VpcPathParam; + pub use crate::v50::instance::VmmPathParam; pub use crate::v7::instance::InstanceMulticastBody; pub use crate::v7::instance::InstanceMulticastMembership; @@ -153,9 +153,9 @@ pub mod inventory { pub use crate::v1::inventory::RemoveMupdateOverrideBootSuccessInventory; pub use crate::v1::inventory::RemoveMupdateOverrideInventory; pub use crate::v1::inventory::SledCpuFamily; - pub use crate::v50::inventory::SledRole; pub use crate::v1::inventory::ZoneArtifactInventory; pub use crate::v1::inventory::ZoneKind; + pub use crate::v50::inventory::SledRole; pub use crate::v10::inventory::NetworkInterface; diff --git a/sled-agent/types/versions/src/measurements/inventory.rs b/sled-agent/types/versions/src/measurements/inventory.rs index 589100d1656..0ffb90f33c2 100644 --- a/sled-agent/types/versions/src/measurements/inventory.rs +++ b/sled-agent/types/versions/src/measurements/inventory.rs @@ -22,9 +22,8 @@ use crate::v1::disk::DatasetConfig; use crate::v1::disk::OmicronPhysicalDiskConfig; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, - HostPhase2DesiredSlots, - ManifestInventory, MupdateOverrideInventory, OrphanedDataset, - RemoveMupdateOverrideInventory, + HostPhase2DesiredSlots, ManifestInventory, MupdateOverrideInventory, + OrphanedDataset, RemoveMupdateOverrideInventory, }; use crate::v11::inventory::OmicronZoneConfig; use crate::v12; diff --git a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs index 8bed9e04b6b..51b10932219 100644 --- a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs +++ b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs @@ -15,7 +15,6 @@ use std::net::SocketAddrV6; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -23,6 +22,7 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24; use crate::v24::inventory::InventoryZpool; +use crate::v50::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs index 79928a478ed..8f470732482 100644 --- a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs @@ -16,7 +16,6 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -25,6 +24,7 @@ use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v34; use crate::v34::inventory::SvcsError; +use crate::v50::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs index fe90bcb83dd..908efbec22d 100644 --- a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs @@ -18,7 +18,6 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -30,6 +29,7 @@ use crate::v34::inventory::SvcsError; use crate::v37; use crate::v40::inventory::{FmdInventory, FmdInventoryError}; use crate::v43; +use crate::v50::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs index 527e3fa27db..0160f18e4e1 100644 --- a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs +++ b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs @@ -16,7 +16,6 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; -use crate::v50::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -24,6 +23,7 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v28; +use crate::v50::inventory::SledRole; #[derive( Debug, diff --git a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs index b02525602ff..907a686cd96 100644 --- a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs +++ b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs @@ -16,13 +16,13 @@ use std::net::SocketAddrV6; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::InventoryZpool; -use crate::v50::inventory::SledRole; use crate::v12::inventory::SvcsInMaintenanceResult; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; +use crate::v50::inventory::SledRole; /// Identity and basic status information about this sled agent #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs b/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs index e30b4881c01..d31f0ffec9b 100644 --- a/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs +++ b/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs @@ -11,4 +11,3 @@ use serde::Deserialize; pub struct VmmPathParam { pub propolis_id: PropolisUuid, } - diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs b/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs index 8fefa7ce938..c406efeafe3 100644 --- a/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs +++ b/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs @@ -2,8 +2,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use serde::{Deserialize, Serialize}; use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; /// Describes the role of the sled within the rack. /// @@ -20,4 +20,3 @@ pub enum SledRole { /// responsibilities. Scrimlet, } - diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs index 2af8f2e14f8..bc7b4ed65dc 100644 --- a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs +++ b/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs @@ -6,7 +6,6 @@ /// Types here were moved from retired versions because they were the latest /// version of that type. - pub mod debug; pub mod instance; pub mod inventory; From d6e5f774f40644a130cc22e9f3ff02711d71aa1b Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Mon, 31 Aug 2026 15:47:26 +0000 Subject: [PATCH 26/34] remove now unused sled-agent-type version --- .../inventory.rs | 29 +------------ .../versions/src/initial/early_networking.rs | 16 ------- .../types/versions/src/initial/inventory.rs | 42 +------------------ 3 files changed, 3 insertions(+), 84 deletions(-) diff --git a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs index 7f424f0a438..d1aa8102228 100644 --- a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs @@ -11,48 +11,23 @@ use iddqd::IdOrdItem; use iddqd::IdOrdMap; use iddqd::id_upcast; use omicron_common::address::NEXUS_LOCKSTEP_PORT; -use omicron_common::api::external::ByteCount; use omicron_common::zpool_name::ZpoolName; use omicron_generation_kinds::Generation; use omicron_ledger::Ledgerable; use omicron_uuid_kinds::{DatasetUuid, MupdateOverrideUuid, OmicronZoneUuid}; -use omicron_uuid_kinds::{PhysicalDiskUuid, SledUuid}; +use omicron_uuid_kinds::PhysicalDiskUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::v1; use crate::v1::disk::DatasetConfig; use crate::v1::disk::OmicronPhysicalDiskConfig; -use crate::v1::inventory::Baseboard; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, - HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, InventoryZpool, + HostPhase2DesiredSlots, NetworkInterface, OmicronZoneDataset, OmicronZoneImageSource, OrphanedDataset, RemoveMupdateOverrideInventory, SourceNatConfig, - ZoneImageResolverInventory, }; -use crate::v50::inventory::SledRole; -use sled_hardware_types::SledCpuFamily; - -/// Identity and basic status information about this sled agent -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct Inventory { - pub sled_id: SledUuid, - pub sled_agent_address: SocketAddrV6, - pub sled_role: SledRole, - pub baseboard: Baseboard, - pub usable_hardware_threads: u32, - pub usable_physical_ram: ByteCount, - pub cpu_family: SledCpuFamily, - pub reservoir_size: ByteCount, - pub disks: Vec, - pub zpools: Vec, - pub datasets: Vec, - pub ledgered_sled_config: Option, - pub reconciler_status: ConfigReconcilerInventoryStatus, - pub last_reconciliation: Option, - pub zone_image_resolver: ZoneImageResolverInventory, -} /// Describes the set of Reconfigurator-managed configuration elements of a sled #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq)] diff --git a/sled-agent/types/versions/src/initial/early_networking.rs b/sled-agent/types/versions/src/initial/early_networking.rs index 29a0a56e689..e29716b01c7 100644 --- a/sled-agent/types/versions/src/initial/early_networking.rs +++ b/sled-agent/types/versions/src/initial/early_networking.rs @@ -9,22 +9,6 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::net::{IpAddr, Ipv4Addr}; -/// This is the actual configuration of EarlyNetworking. -/// -/// We 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. -#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)] -pub struct EarlyNetworkConfigBody { - /// The external NTP server addresses. - pub ntp_servers: Vec, - - // Rack network configuration as delivered from RSS or Nexus - pub rack_network_config: Option, -} - /// Initial network configuration #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)] pub struct RackNetworkConfig { diff --git a/sled-agent/types/versions/src/initial/inventory.rs b/sled-agent/types/versions/src/initial/inventory.rs index edfa4835f5d..4fb5dcde008 100644 --- a/sled-agent/types/versions/src/initial/inventory.rs +++ b/sled-agent/types/versions/src/initial/inventory.rs @@ -27,7 +27,7 @@ use omicron_common::zpool_name::ZpoolName; use omicron_generation_kinds::Generation; use omicron_uuid_kinds::{ DatasetUuid, InternalZpoolUuid, MupdateOverrideUuid, OmicronZoneUuid, - PhysicalDiskUuid, SledUuid, ZpoolUuid, + PhysicalDiskUuid, ZpoolUuid, }; use oxnet::IpNet; use schemars::schema::{Schema, SchemaObject}; @@ -46,7 +46,6 @@ use super::disk::DiskVariant; use super::disk::M2Slot; use super::disk::OmicronPhysicalDiskConfig; use crate::impls::inventory::SourceNatConfigError; -use crate::v50::inventory::SledRole; /// Describes properties that should uniquely identify a Gimlet. /// @@ -630,26 +629,6 @@ fn path_schema(generator: &mut SchemaGenerator) -> Schema { schema.into() } -/// Identity and basic status information about this sled agent -#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] -pub struct Inventory { - pub sled_id: SledUuid, - pub sled_agent_address: SocketAddrV6, - pub sled_role: SledRole, - pub baseboard: Baseboard, - pub usable_hardware_threads: u32, - pub usable_physical_ram: ByteCount, - pub cpu_family: SledCpuFamily, - pub reservoir_size: ByteCount, - pub disks: Vec, - pub zpools: Vec, - pub datasets: Vec, - pub ledgered_sled_config: Option, - pub reconciler_status: ConfigReconcilerInventoryStatus, - pub last_reconciliation: Option, - pub zone_image_resolver: ZoneImageResolverInventory, -} - /// Describes the set of Reconfigurator-managed configuration elements of a sled #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq)] pub struct OmicronSledConfig { @@ -836,25 +815,6 @@ pub enum ConfigReconcilerInventoryStatus { Idle { completed_at: DateTime, ran_for: Duration }, } -/// Describes the set of Omicron-managed zones running on a sled -#[derive( - Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq, Hash, -)] -pub struct OmicronZonesConfig { - /// generation number of this configuration - /// - /// This generation number is owned by the control plane (i.e., RSS or - /// Nexus, depending on whether RSS-to-Nexus handoff has happened). It - /// should not be bumped within Sled Agent. - /// - /// Sled Agent rejects attempts to set the configuration to a generation - /// older than the one it's currently running. - pub generation: Generation, - - /// list of running zones - pub zones: Vec, -} - /// An IP address and port range used for source NAT, i.e., making /// outbound network connections from guests or services. // Note that `Deserialize` is manually implemented; if you make any From e4a24725553f2e456d6cb146cf09b284f80822f4 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Mon, 31 Aug 2026 16:33:53 +0000 Subject: [PATCH 27/34] remove now unused sled-agent-type version --- .../inventory.rs | 26 +++---------------- .../versions/src/initial/early_networking.rs | 20 +------------- .../types/versions/src/initial/inventory.rs | 21 +-------------- 3 files changed, 5 insertions(+), 62 deletions(-) diff --git a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs index d1aa8102228..060182b1ddb 100644 --- a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs @@ -2,7 +2,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use std::collections::BTreeMap; use std::net::{IpAddr, Ipv6Addr, SocketAddr, SocketAddrV6}; use std::time::Duration; @@ -14,8 +13,8 @@ use omicron_common::address::NEXUS_LOCKSTEP_PORT; use omicron_common::zpool_name::ZpoolName; use omicron_generation_kinds::Generation; use omicron_ledger::Ledgerable; -use omicron_uuid_kinds::{DatasetUuid, MupdateOverrideUuid, OmicronZoneUuid}; -use omicron_uuid_kinds::PhysicalDiskUuid; +use omicron_uuid_kinds::MupdateOverrideUuid; +use omicron_uuid_kinds::OmicronZoneUuid; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -23,10 +22,9 @@ use crate::v1; use crate::v1::disk::DatasetConfig; use crate::v1::disk::OmicronPhysicalDiskConfig; use crate::v1::inventory::{ - BootPartitionContents, ConfigReconcilerInventoryResult, HostPhase2DesiredSlots, NetworkInterface, OmicronZoneDataset, OmicronZoneImageSource, - OrphanedDataset, RemoveMupdateOverrideInventory, SourceNatConfig, + SourceNatConfig, }; /// Describes the set of Reconfigurator-managed configuration elements of a sled @@ -202,24 +200,6 @@ fn default_nexus_lockstep_port() -> u16 { omicron_common::address::NEXUS_LOCKSTEP_PORT } -/// Describes the last attempt made by the sled-agent-config-reconciler to -/// reconcile the current sled config against the actual state of the sled. -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] -#[serde(rename_all = "snake_case")] -pub struct ConfigReconcilerInventory { - pub last_reconciled_config: OmicronSledConfig, - pub external_disks: - BTreeMap, - pub datasets: BTreeMap, - pub orphaned_datasets: IdOrdMap, - pub zones: BTreeMap, - pub boot_partitions: BootPartitionContents, - /// The result of removing the mupdate override file on disk. - /// - /// `None` if `remove_mupdate_override` was not provided in the sled config. - pub remove_mupdate_override: Option, -} - /// Status of the sled-agent-config-reconciler task. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] #[serde(tag = "status", rename_all = "snake_case")] diff --git a/sled-agent/types/versions/src/initial/early_networking.rs b/sled-agent/types/versions/src/initial/early_networking.rs index e29716b01c7..121e0c0f0e0 100644 --- a/sled-agent/types/versions/src/initial/early_networking.rs +++ b/sled-agent/types/versions/src/initial/early_networking.rs @@ -4,29 +4,11 @@ //! Types for network setup required to bring up the control plane. -use oxnet::{IpNet, Ipv4Net, Ipv6Net}; +use oxnet::{IpNet, Ipv4Net}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::net::{IpAddr, Ipv4Addr}; -/// Initial network configuration -#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)] -pub struct RackNetworkConfig { - pub rack_subnet: Ipv6Net, - // TODO: #3591 Consider making infra-ip ranges implicit for uplinks - /// First ip address to be used for configuring network infrastructure - pub infra_ip_first: Ipv4Addr, - /// Last ip address to be used for configuring network infrastructure - pub infra_ip_last: Ipv4Addr, - /// Uplinks for connecting the rack to external networks - pub ports: Vec, - /// BGP configurations for connecting the rack to external networks - pub bgp: Vec, - /// BFD configuration for connecting the rack to external networks - #[serde(default)] - pub bfd: Vec, -} - #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)] pub struct BgpConfig { /// The autonomous system number for the BGP configuration. diff --git a/sled-agent/types/versions/src/initial/inventory.rs b/sled-agent/types/versions/src/initial/inventory.rs index 4fb5dcde008..e65d42f5916 100644 --- a/sled-agent/types/versions/src/initial/inventory.rs +++ b/sled-agent/types/versions/src/initial/inventory.rs @@ -4,7 +4,6 @@ //! Inventory types for Sled Agent API versions 1-3. -use std::collections::BTreeMap; use std::net::{IpAddr, Ipv6Addr, SocketAddr, SocketAddrV6}; use std::time::Duration; @@ -27,7 +26,7 @@ use omicron_common::zpool_name::ZpoolName; use omicron_generation_kinds::Generation; use omicron_uuid_kinds::{ DatasetUuid, InternalZpoolUuid, MupdateOverrideUuid, OmicronZoneUuid, - PhysicalDiskUuid, ZpoolUuid, + ZpoolUuid, }; use oxnet::IpNet; use schemars::schema::{Schema, SchemaObject}; @@ -775,24 +774,6 @@ pub enum OmicronZoneType { }, } -/// Describes the last attempt made by the sled-agent-config-reconciler to -/// reconcile the current sled config against the actual state of the sled. -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] -#[serde(rename_all = "snake_case")] -pub struct ConfigReconcilerInventory { - pub last_reconciled_config: OmicronSledConfig, - pub external_disks: - BTreeMap, - pub datasets: BTreeMap, - pub orphaned_datasets: IdOrdMap, - pub zones: BTreeMap, - pub boot_partitions: BootPartitionContents, - /// The result of removing the mupdate override file on disk. - /// - /// `None` if `remove_mupdate_override` was not provided in the sled config. - pub remove_mupdate_override: Option, -} - /// Status of the sled-agent-config-reconciler task. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, JsonSchema, Serialize)] #[serde(tag = "status", rename_all = "snake_case")] From 5bb56d2f33dca2499b477d5ed5e41863fd6a2538 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Mon, 31 Aug 2026 19:40:54 +0000 Subject: [PATCH 28/34] remove now unused sled-agent-type version --- .../versions/src/initial/early_networking.rs | 43 +------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/sled-agent/types/versions/src/initial/early_networking.rs b/sled-agent/types/versions/src/initial/early_networking.rs index 121e0c0f0e0..695b91d73bb 100644 --- a/sled-agent/types/versions/src/initial/early_networking.rs +++ b/sled-agent/types/versions/src/initial/early_networking.rs @@ -4,27 +4,11 @@ //! Types for network setup required to bring up the control plane. -use oxnet::{IpNet, Ipv4Net}; +use oxnet::IpNet; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::net::{IpAddr, Ipv4Addr}; -#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)] -pub struct BgpConfig { - /// The autonomous system number for the BGP configuration. - pub asn: u32, - /// The set of prefixes for the BGP router to originate. - pub originate: Vec, - - /// Shaper to apply to outgoing messages. - #[serde(default)] - pub shaper: Option, - - /// Checker to apply to incoming messages. - #[serde(default)] - pub checker: Option, -} - #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)] pub struct BgpPeerConfig { /// The autonomous system number of the router the peer belongs to. @@ -190,31 +174,6 @@ pub struct TxEqConfig { pub post1: Option, } -#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)] -pub struct PortConfig { - /// The set of routes associated with this port. - pub routes: Vec, - /// This port's addresses and optional vlan IDs - pub addresses: Vec, - /// Switch the port belongs to. - pub switch: SwitchSlot, - /// Nmae of the port this config applies to. - pub port: String, - /// Port speed. - pub uplink_port_speed: LinkSpeed, - /// Port forward error correction type. - pub uplink_port_fec: Option, - /// BGP peers on this port - pub bgp_peers: Vec, - /// Whether or not to set autonegotiation - #[serde(default)] - pub autoneg: bool, - /// LLDP configuration for this port - pub lldp: Option, - /// TX-EQ configuration for this port - pub tx_eq: Option, -} - /// Identifies switch physical location #[derive( Clone, From 30a02ae51235a4d1a140e4b3f66b1c904d7c6ce8 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Mon, 31 Aug 2026 21:03:34 +0000 Subject: [PATCH 29/34] remove now unused sled-agent-type version --- .../versions/src/initial/early_networking.rs | 55 +------------------ 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/sled-agent/types/versions/src/initial/early_networking.rs b/sled-agent/types/versions/src/initial/early_networking.rs index 695b91d73bb..4ebf073c946 100644 --- a/sled-agent/types/versions/src/initial/early_networking.rs +++ b/sled-agent/types/versions/src/initial/early_networking.rs @@ -7,60 +7,7 @@ use oxnet::IpNet; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use std::net::{IpAddr, Ipv4Addr}; - -#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)] -pub struct BgpPeerConfig { - /// The autonomous system number of the router the peer belongs to. - pub asn: u32, - /// Switch port the peer is reachable on. - pub port: String, - /// Address of the peer. Use `Ipv4Addr::UNSPECIFIED` to indicate an - /// unnumbered BGP session established over the interface specified by - /// `port`. - pub addr: Ipv4Addr, - /// How long to keep a session alive without a keepalive in seconds. - /// Defaults to 6. - pub hold_time: Option, - /// How long to keep a peer in idle after a state machine reset in seconds. - pub idle_hold_time: Option, - /// How long to delay sending open messages to a peer. In seconds. - pub delay_open: Option, - /// The interval in seconds between peer connection retry attempts. - pub connect_retry: Option, - /// The interval to send keepalive messages at. - pub keepalive: Option, - /// Require that a peer has a specified ASN. - #[serde(default)] - pub remote_asn: Option, - /// Require messages from a peer have a minimum IP time to live field. - #[serde(default)] - pub min_ttl: Option, - /// Use the given key for TCP-MD5 authentication with the peer. - #[serde(default)] - pub md5_auth_key: Option, - /// Apply the provided multi-exit discriminator (MED) updates sent to the peer. - #[serde(default)] - pub multi_exit_discriminator: Option, - /// Include the provided communities in updates sent to the peer. - #[serde(default)] - pub communities: Vec, - /// Apply a local preference to routes received from this peer. - #[serde(default)] - pub local_pref: Option, - /// Enforce that the first AS in paths received from this peer is the peer's AS. - #[serde(default)] - pub enforce_first_as: bool, - /// Define import policy for a peer. - #[serde(default)] - pub allowed_import: ImportExportPolicy, - /// Define export policy for a peer. - #[serde(default)] - pub allowed_export: ImportExportPolicy, - /// Associate a VLAN ID with a BGP peer session. - #[serde(default)] - pub vlan_id: Option, -} +use std::net::IpAddr; #[derive( Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Hash, JsonSchema, From 0b5ea486ae5a574eb8954bf5f42cd7818ce49f59 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Mon, 31 Aug 2026 21:12:06 +0000 Subject: [PATCH 30/34] fmt --- .../src/add_nexus_lockstep_port_to_inventory/inventory.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs index 060182b1ddb..6f704eff1a6 100644 --- a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs @@ -22,9 +22,8 @@ use crate::v1; use crate::v1::disk::DatasetConfig; use crate::v1::disk::OmicronPhysicalDiskConfig; use crate::v1::inventory::{ - HostPhase2DesiredSlots, - NetworkInterface, OmicronZoneDataset, OmicronZoneImageSource, - SourceNatConfig, + HostPhase2DesiredSlots, NetworkInterface, OmicronZoneDataset, + OmicronZoneImageSource, SourceNatConfig, }; /// Describes the set of Reconfigurator-managed configuration elements of a sled From 4a68a61c2745030000d5d174c51edbc91b75038c Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Mon, 31 Aug 2026 21:28:49 +0000 Subject: [PATCH 31/34] fix up bad rebase over main: v50 -> v51 --- sled-agent/api/src/lib.rs | 5 ++--- .../types/versions/src/add_fmd_to_inventory/inventory.rs | 2 +- .../types/versions/src/add_update_disposition/inventory.rs | 2 +- .../versions/src/add_zpool_health_to_inventory/inventory.rs | 2 +- .../types/versions/src/inventory_baseboard_id/inventory.rs | 2 +- sled-agent/types/versions/src/latest.rs | 4 ++-- .../versions/src/modify_services_in_inventory/inventory.rs | 2 +- .../src/modify_svc_enabled_not_online_state/inventory.rs | 2 +- .../types/versions/src/modify_svc_state_enum/inventory.rs | 2 +- sled-agent/types/versions/src/modify_svcs_types/inventory.rs | 2 +- .../src/remove_health_monitor_keep_checks/inventory.rs | 2 +- .../versions/src/typed_sled_config_generation/inventory.rs | 3 ++- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index d176702e082..cee45c0e985 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -17,9 +17,8 @@ use omicron_common::api::internal::shared::{ SledIdentifiers, VirtualNetworkInterfaceHost, }; use sled_agent_types_versions::{ - latest, v1, v11, v14, v18, v20, v22, - v24, v25, v26, v28, v29, v30, v31, v32, v33, v34, v37, v39, v40, v41, v42, - v43, v46, v47, v48, v49, + latest, v1, v11, v14, v18, v20, v22, v24, v25, v26, v28, v29, v30, v31, + v32, v33, v34, v37, v39, v40, v41, v42, v43, v46, v47, v48, v49, }; use sled_diagnostics::SledDiagnosticsQueryOutput; use slog_error_chain::InlineErrorChain; diff --git a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs index 1cdbdc25246..496c9b0dbe1 100644 --- a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs @@ -22,7 +22,7 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v37; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; /// A diagnosed fault case from the illumos Fault Management Daemon on a sled. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, JsonSchema)] diff --git a/sled-agent/types/versions/src/add_update_disposition/inventory.rs b/sled-agent/types/versions/src/add_update_disposition/inventory.rs index 8f0af152e3f..cfe04306dca 100644 --- a/sled-agent/types/versions/src/add_update_disposition/inventory.rs +++ b/sled-agent/types/versions/src/add_update_disposition/inventory.rs @@ -30,7 +30,7 @@ use crate::v24::inventory::InventoryZpool; use crate::v40::inventory::FmdInventory; use crate::v40::inventory::FmdInventoryError; use crate::v46::inventory::SvcsEnabledNotOnlineResult; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; use chrono::DateTime; use chrono::Utc; use iddqd::IdOrdMap; diff --git a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs index b4e5b8696e4..2660f78b2af 100644 --- a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs @@ -24,7 +24,7 @@ use crate::v14::inventory::OmicronSledConfig; use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v22; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; #[derive( Clone, diff --git a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs index 419241d22b6..ca33d5b11a4 100644 --- a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs +++ b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs @@ -24,7 +24,7 @@ use crate::v24::inventory::InventoryZpool; use crate::v37::inventory::SvcsEnabledNotOnlineResult; use crate::v40; use crate::v40::inventory::{FmdInventory, FmdInventoryError}; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; /// Identity and basic status information about this sled agent #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index 98f7cca3a3e..bbdc9ae873a 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -114,7 +114,7 @@ pub mod instance { pub use crate::v1::instance::VmmStateRequested; pub use crate::v1::instance::VmmUnregisterResponse; pub use crate::v1::instance::VpcPathParam; - pub use crate::v50::instance::VmmPathParam; + pub use crate::v51::instance::VmmPathParam; pub use crate::v7::instance::InstanceMulticastBody; pub use crate::v7::instance::InstanceMulticastMembership; @@ -155,7 +155,7 @@ pub mod inventory { pub use crate::v1::inventory::SledCpuFamily; pub use crate::v1::inventory::ZoneArtifactInventory; pub use crate::v1::inventory::ZoneKind; - pub use crate::v50::inventory::SledRole; + pub use crate::v51::inventory::SledRole; pub use crate::v10::inventory::NetworkInterface; diff --git a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs index 51b10932219..887614c10df 100644 --- a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs +++ b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs @@ -22,7 +22,7 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24; use crate::v24::inventory::InventoryZpool; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs index 8f470732482..1a3b4ec51ad 100644 --- a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs @@ -24,7 +24,7 @@ use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v34; use crate::v34::inventory::SvcsError; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs index 908efbec22d..998c6c6a3db 100644 --- a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs @@ -29,7 +29,7 @@ use crate::v34::inventory::SvcsError; use crate::v37; use crate::v40::inventory::{FmdInventory, FmdInventoryError}; use crate::v43; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs index 0160f18e4e1..5b8a5bacb2e 100644 --- a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs +++ b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs @@ -23,7 +23,7 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v28; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; #[derive( Debug, diff --git a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs index 907a686cd96..2336348345c 100644 --- a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs +++ b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs @@ -22,7 +22,7 @@ use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; -use crate::v50::inventory::SledRole; +use crate::v51::inventory::SledRole; /// Identity and basic status information about this sled agent #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs b/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs index 9e018e9b087..817ebc17e0c 100644 --- a/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs +++ b/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs @@ -24,7 +24,7 @@ use crate::v1::disk::{DatasetConfig, OmicronPhysicalDiskConfig}; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, OrphanedDataset, - RemoveMupdateOverrideInventory, SledRole, + RemoveMupdateOverrideInventory, }; use crate::v11::inventory::OmicronZoneConfig; use crate::v14::inventory::{ @@ -36,6 +36,7 @@ use crate::v40::inventory::{FmdInventory, FmdInventoryError}; use crate::v46::inventory::SvcsEnabledNotOnlineResult; use crate::v49; use crate::v49::inventory::OmicronSledUpdateDisposition; +use crate::v51::inventory::SledRole; /// Describes the set of Reconfigurator-managed configuration elements of a sled #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq)] From 1d51fb526c77821274d4cf080f378eec138b0e79 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Tue, 1 Sep 2026 15:24:48 +0000 Subject: [PATCH 32/34] put all types back where they came, delete v51 --- .../sled-agent-50.0.0-240307.json.gitstub | 1 - .../sled-agent/sled-agent-51.0.0-f0475d.json | 10995 ---------------- openapi/sled-agent/sled-agent-latest.json | 2 +- sled-agent/api/src/lib.rs | 1 - .../src/add_fmd_to_inventory/inventory.rs | 2 +- .../debug.rs | 0 .../mod.rs | 8 +- .../src/add_update_disposition/inventory.rs | 2 +- .../inventory.rs | 2 +- .../types/versions/src/initial/instance.rs | 6 + .../types/versions/src/initial/inventory.rs | 16 + .../src/inventory_baseboard_id/inventory.rs | 2 +- sled-agent/types/versions/src/latest.rs | 6 +- sled-agent/types/versions/src/lib.rs | 4 +- .../modify_services_in_inventory/inventory.rs | 2 +- .../inventory.rs | 2 +- .../src/modify_svc_state_enum/inventory.rs | 2 +- .../src/modify_svcs_types/inventory.rs | 2 +- .../inventory.rs | 2 +- .../src/retire_up_to_version_23/instance.rs | 13 - .../src/retire_up_to_version_23/inventory.rs | 22 - .../typed_sled_config_generation/inventory.rs | 2 +- 22 files changed, 41 insertions(+), 11053 deletions(-) delete mode 100644 openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub delete mode 100644 openapi/sled-agent/sled-agent-51.0.0-f0475d.json rename sled-agent/types/versions/src/{retire_up_to_version_23 => add_switch_zone_operator_policy}/debug.rs (100%) rename sled-agent/types/versions/src/{retire_up_to_version_23 => add_switch_zone_operator_policy}/mod.rs (52%) delete mode 100644 sled-agent/types/versions/src/retire_up_to_version_23/instance.rs delete mode 100644 sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs diff --git a/openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub b/openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub deleted file mode 100644 index 7d70606306e..00000000000 --- a/openapi/sled-agent/sled-agent-50.0.0-240307.json.gitstub +++ /dev/null @@ -1 +0,0 @@ -5c5a6b98a96b2106757efec1aee87afdabeb1f71:openapi/sled-agent/sled-agent-50.0.0-240307.json diff --git a/openapi/sled-agent/sled-agent-51.0.0-f0475d.json b/openapi/sled-agent/sled-agent-51.0.0-f0475d.json deleted file mode 100644 index f1c43871ff8..00000000000 --- a/openapi/sled-agent/sled-agent-51.0.0-f0475d.json +++ /dev/null @@ -1,10995 +0,0 @@ -{ - "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": "51.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" - } - } - } - }, - "/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" - } - } - } - }, - "/local-storage": { - "post": { - "summary": "Create a local storage dataset", - "operationId": "local_storage_dataset_ensure", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LocalStorageDatasetEnsureRequest" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - }, - "delete": { - "summary": "Delete a local storage dataset", - "operationId": "local_storage_dataset_delete", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LocalStorageDatasetDeleteRequest" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/network-bootstore-config": { - "put": { - "operationId": "write_network_bootstore_config", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WriteNetworkConfigRequest" - } - } - }, - "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" - } - } - } - }, - "/probes": { - "put": { - "summary": "Update the entire set of probe zones on this sled.", - "description": "Probe zones are used to debug networking configuration. They look similar to instances, in that they have an OPTE port on a VPC subnet and external addresses, but no actual VM.", - "operationId": "probes_put", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProbeSet" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/rot/{rot}/attest": { - "post": { - "summary": "Return attestation over recorded measurments and nonce from the RoT.", - "operationId": "rot_attest", - "parameters": [ - { - "in": "path", - "name": "rot", - "description": "Which RoT to use", - "required": true, - "schema": { - "$ref": "#/components/schemas/Rot" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Nonce" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attestation" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/rot/{rot}/certificate-chain": { - "get": { - "summary": "Return the certificate chain for the attestation signer from the RoT.", - "operationId": "rot_certificate_chain", - "parameters": [ - { - "in": "path", - "name": "rot", - "description": "Which RoT to use", - "required": true, - "schema": { - "$ref": "#/components/schemas/Rot" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CertificateChain" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/rot/{rot}/measurement-log": { - "get": { - "summary": "Return the set of measurments recorded by the RoT.", - "operationId": "rot_measurement_log", - "parameters": [ - { - "in": "path", - "name": "rot", - "description": "Which RoT to use", - "required": true, - "schema": { - "$ref": "#/components/schemas/Rot" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MeasurementLog" - } - } - } - }, - "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" - } - } - } - }, - "/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" - } - } - } - }, - "/trust-quorum/commit": { - "put": { - "summary": "Commit a trust quorum configuration", - "operationId": "trust_quorum_commit", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitRequest" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/configuration": { - "post": { - "summary": "Initiate a trust quorum reconfiguration", - "operationId": "trust_quorum_reconfigure", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReconfigureMsg" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/coordinator-status": { - "get": { - "summary": "Get the coordinator status if this node is coordinating a reconfiguration", - "operationId": "trust_quorum_coordinator_status", - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CoordinatorStatus" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/network-config": { - "get": { - "summary": "Get the current network config from trust quorum", - "operationId": "trust_quorum_network_config_get", - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrustQuorumNetworkConfig" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - }, - "put": { - "summary": "Update the network config in trust quorum", - "operationId": "trust_quorum_network_config_put", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrustQuorumNetworkConfig" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/prepare-and-commit": { - "put": { - "summary": "Attempt to prepare and commit a trust quorum configuration", - "operationId": "trust_quorum_prepare_and_commit", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PrepareAndCommitRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitStatus" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/proxy/commit": { - "put": { - "summary": "Proxy a commit operation to another trust quorum node", - "operationId": "trust_quorum_proxy_commit", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProxyCommitRequest" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/proxy/prepare-and-commit": { - "put": { - "summary": "Proxy a prepare-and-commit operation to another trust quorum node", - "operationId": "trust_quorum_proxy_prepare_and_commit", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProxyPrepareAndCommitRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitStatus" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/proxy/status": { - "get": { - "summary": "Proxy a status request to another trust quorum node", - "operationId": "trust_quorum_proxy_status", - "parameters": [ - { - "in": "query", - "name": "part_number", - "description": "Oxide Part Number", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "serial_number", - "description": "Serial number (unique for a given part number)", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NodeStatus" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/status": { - "get": { - "summary": "Get the status of this trust quorum node", - "operationId": "trust_quorum_status", - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NodeStatus" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/trust-quorum/upgrade": { - "post": { - "summary": "Initiate an upgrade from LRTQ", - "operationId": "trust_quorum_upgrade_from_lrtq", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LrtqUpgradeMsg" - } - } - }, - "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}/attached-subnets": { - "put": { - "summary": "Update the subnets attached to an instance.", - "operationId": "vmm_put_attached_subnets", - "parameters": [ - { - "in": "path", - "name": "propolis_id", - "required": true, - "schema": { - "$ref": "#/components/schemas/PropolisUuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachedSubnets" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - }, - "post": { - "summary": "Attach a subnet to an instance.", - "operationId": "vmm_post_attached_subnet", - "parameters": [ - { - "in": "path", - "name": "propolis_id", - "required": true, - "schema": { - "$ref": "#/components/schemas/PropolisUuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachedSubnet" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - }, - "delete": { - "summary": "Delete all subnets attached to an instance.", - "operationId": "vmm_delete_attached_subnets", - "parameters": [ - { - "in": "path", - "name": "propolis_id", - "required": true, - "schema": { - "$ref": "#/components/schemas/PropolisUuid" - } - } - ], - "responses": { - "204": { - "description": "successful deletion" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/vmms/{propolis_id}/attached-subnets/{subnet}": { - "delete": { - "summary": "Detach a subnet from an instance.", - "operationId": "vmm_delete_attached_subnet", - "parameters": [ - { - "in": "path", - "name": "propolis_id", - "required": true, - "schema": { - "$ref": "#/components/schemas/PropolisUuid" - } - }, - { - "in": "path", - "name": "subnet", - "required": true, - "schema": { - "$ref": "#/components/schemas/IpNet" - } - } - ], - "responses": { - "204": { - "description": "successful deletion" - }, - "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}/multicast-group": { - "put": { - "operationId": "vmm_join_multicast_group", - "parameters": [ - { - "in": "path", - "name": "propolis_id", - "required": true, - "schema": { - "$ref": "#/components/schemas/PropolisUuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InstanceMulticastBody" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated" - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - }, - "delete": { - "operationId": "vmm_leave_multicast_group", - "parameters": [ - { - "in": "path", - "name": "propolis_id", - "required": true, - "schema": { - "$ref": "#/components/schemas/PropolisUuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InstanceMulticastBody" - } - } - }, - "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": "successful operation", - "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" - ] - }, - "Alarm": { - "description": "An alarm indicating a protocol invariant violation.", - "oneOf": [ - { - "description": "Different configurations found for the same epoch.\n\nReason: Nexus creates configurations and stores them in CRDB before sending them to a coordinator of its choosing. Nexus will not send the same reconfiguration request to different coordinators. If it does those coordinators will generate different key shares. However, since Nexus will not tell different nodes to coordinate the same configuration, this state should be impossible to reach.", - "type": "object", - "properties": { - "mismatched_configurations": { - "type": "object", - "properties": { - "config1": { - "$ref": "#/components/schemas/Configuration" - }, - "config2": { - "$ref": "#/components/schemas/Configuration" - }, - "from": { - "description": "Either a stringified `BaseboardId` or \"Nexus\".", - "type": "string" - } - }, - "required": [ - "config1", - "config2", - "from" - ] - } - }, - "required": [ - "mismatched_configurations" - ], - "additionalProperties": false - }, - { - "description": "The `keyShareComputer` could not compute this node's share.\n\nReason: A threshold of valid key shares were received based on the the share digests in the Configuration. However, computation of the share still failed. This should be impossible.", - "type": "object", - "properties": { - "share_computation_failed": { - "type": "object", - "properties": { - "epoch": { - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "err": { - "$ref": "#/components/schemas/CombineError" - } - }, - "required": [ - "epoch", - "err" - ] - } - }, - "required": [ - "share_computation_failed" - ], - "additionalProperties": false - }, - { - "description": "We started collecting shares for a committed configuration, but we no longer have that configuration in our persistent state.", - "type": "object", - "properties": { - "committed_configuration_lost": { - "type": "object", - "properties": { - "collecting_epoch": { - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "latest_committed_epoch": { - "type": "integer", - "format": "uint64", - "minimum": 0 - } - }, - "required": [ - "collecting_epoch", - "latest_committed_epoch" - ] - } - }, - "required": [ - "committed_configuration_lost" - ], - "additionalProperties": false - }, - { - "description": "Decrypting the encrypted rack secrets failed when presented with a `valid` RackSecret.\n\n`Configuration` membership contains the hashes of each valid share. All shares utilized to reconstruct the rack secret were validated against these hashes, and the rack secret was reconstructed. However, using the rack secret to derive encryption keys and decrypt the secrets from old configurations still failed. This should never be possible, and therefore we raise an alarm.", - "type": "object", - "properties": { - "rack_secret_decryption_failed": { - "type": "object", - "properties": { - "epoch": { - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "err": { - "$ref": "#/components/schemas/DecryptionError" - } - }, - "required": [ - "epoch", - "err" - ] - } - }, - "required": [ - "rack_secret_decryption_failed" - ], - "additionalProperties": false - }, - { - "description": "Reconstructing the rack secret failed when presented with `valid` shares.\n\n`Configuration` membership contains the hashes of each valid share. All shares utilized to reconstruct the rack secret were validated against these hashes, and yet, the reconstruction still failed. This indicates either a bit flip in a share after validation, or, more likely, an invalid hash.", - "type": "object", - "properties": { - "rack_secret_reconstruction_failed": { - "type": "object", - "properties": { - "epoch": { - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "err": { - "$ref": "#/components/schemas/RackSecretReconstructError" - } - }, - "required": [ - "epoch", - "err" - ] - } - }, - "required": [ - "rack_secret_reconstruction_failed" - ], - "additionalProperties": false - } - ] - }, - "ArtifactConfig": { - "description": "Artifact configuration.\n\nThis type is used in both GET (response) and PUT (request) operations.", - "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": { - "description": "Request body for copying artifacts from a depot.", - "type": "object", - "properties": { - "depot_base_url": { - "type": "string" - } - }, - "required": [ - "depot_base_url" - ] - }, - "ArtifactCopyFromDepotResponse": { - "description": "Response for copying artifacts from a depot.", - "type": "object" - }, - "ArtifactListResponse": { - "description": "Response for listing artifacts.", - "type": "object", - "properties": { - "generation": { - "$ref": "#/components/schemas/Generation" - }, - "list": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "uint", - "minimum": 0 - } - } - }, - "required": [ - "generation", - "list" - ] - }, - "ArtifactPutResponse": { - "description": "Response for putting an artifact.", - "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" - ] - }, - "AttachedSubnet": { - "description": "A subnet attached to a single instance.", - "type": "object", - "properties": { - "kind": { - "description": "The kind of subnet that is attached.", - "allOf": [ - { - "$ref": "#/components/schemas/AttachedSubnetKind" - } - ] - }, - "subnet": { - "description": "The IP subnet.", - "allOf": [ - { - "$ref": "#/components/schemas/IpNet" - } - ] - } - }, - "required": [ - "kind", - "subnet" - ] - }, - "AttachedSubnetKind": { - "description": "The kind of attached subnet.", - "oneOf": [ - { - "description": "This is a VPC subnet.", - "type": "string", - "enum": [ - "vpc" - ] - }, - { - "description": "This is an external subnet.", - "type": "string", - "enum": [ - "external" - ] - } - ] - }, - "AttachedSubnets": { - "description": "Subnets attached to a single instance.", - "type": "object", - "properties": { - "subnets": { - "title": "IdOrdMap", - "x-rust-type": { - "crate": "iddqd", - "parameters": [ - { - "$ref": "#/components/schemas/AttachedSubnet" - } - ], - "path": "iddqd::IdOrdMap", - "version": "*" - }, - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedSubnet" - }, - "uniqueItems": true - } - }, - "required": [ - "subnets" - ] - }, - "Attestation": { - "description": "An RoT produced attestation that represents a signature over the provided [`Nonce`] combined with the [`MeasurementLog`] and signed by a key certified by the [`CertificateChain`].", - "oneOf": [ - { - "description": "An Ed25519 signature.", - "type": "object", - "properties": { - "ed25519": { - "type": "string", - "format": "hex string (64 bytes)" - } - }, - "required": [ - "ed25519" - ], - "additionalProperties": false - } - ] - }, - "Baseboard": { - "description": "Describes properties that should uniquely identify a Gimlet.\n\nThis is the frozen, original form of the baseboard as published by Sled Agent API versions 1 through 39. Newer versions report a [`BaseboardId`] instead. The `Unknown` variant is retained here solely to preserve the blessed schema of these older versions; it is no longer produced.\n\n[`BaseboardId`]: sled_hardware_types::BaseboardId", - "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.\n\nThis 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/SwitchSlot" - } - }, - "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" - }, - "max_paths": { - "description": "Maximum number of paths to use when multiple \"best paths\" exist", - "default": 1, - "allOf": [ - { - "$ref": "#/components/schemas/MaxPathConfig" - } - ] - }, - "originate": { - "description": "The set of prefixes for the BGP router to originate.", - "type": "array", - "items": { - "$ref": "#/components/schemas/IpNet" - } - }, - "shaper": { - "nullable": true, - "description": "Shaper to apply to outgoing messages.", - "default": null, - "type": "string" - } - }, - "required": [ - "asn", - "originate" - ] - }, - "BgpPeerConfig": { - "description": "A BGP peer configuration for a port.", - "type": "object", - "properties": { - "addr": { - "description": "Address of the peer (numbered or unnumbered).", - "allOf": [ - { - "$ref": "#/components/schemas/RouterPeerType" - } - ] - }, - "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 - }, - "BlueprintExternalNetworkingConfig": { - "description": "External networking configuration controlled by Reconfigurator via blueprints.", - "type": "object", - "properties": { - "blueprint_external_networking_generation": { - "description": "The current generation number of the blueprint's external networking config.\n\nThis generation number is only bumped when a new blueprint is produced that changes the external networking configuration in some way.", - "allOf": [ - { - "$ref": "#/components/schemas/Generation" - } - ] - }, - "service_zone_nat_entries": { - "description": "Set of all Omicron service zone NAT entries.", - "allOf": [ - { - "$ref": "#/components/schemas/ServiceZoneNatEntries" - } - ] - } - }, - "required": [ - "blueprint_external_networking_generation", - "service_zone_nat_entries" - ] - }, - "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": { - "description": "Status of the local bootstore node.", - "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 - }, - "CertificateChain": { - "description": "A chain of PEM-encoded X.509 certificates (RFC5280) that link an attestation signing key to a trusted PKI root.", - "type": "array", - "items": { - "type": "string" - } - }, - "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" - } - ] - }, - "CombineError": { - "type": "string", - "enum": [ - "too_few_shares", - "duplicate_x_coordinates", - "invalid_share_lengths", - "invalid_share_id" - ] - }, - "CommitRequest": { - "description": "Request to commit a trust quorum configuration at a given epoch.", - "type": "object", - "properties": { - "epoch": { - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "rack_id": { - "$ref": "#/components/schemas/RackUuid" - } - }, - "required": [ - "epoch", - "rack_id" - ] - }, - "CommitStatus": { - "description": "Whether or not a configuration has been committed or is still underway.", - "type": "string", - "enum": [ - "committed", - "pending" - ] - }, - "Component": { - "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/VirtioSocket" - }, - "type": { - "type": "string", - "enum": [ - "virtio_socket" - ] - } - }, - "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" - ] - } - ] - }, - "Configuration": { - "description": "The configuration for a given epoch.\n\nOnly valid for non-lrtq configurations.", - "type": "object", - "properties": { - "coordinator": { - "description": "Who was the coordinator of this reconfiguration?", - "allOf": [ - { - "$ref": "#/components/schemas/BaseboardId" - } - ] - }, - "encrypted_rack_secrets": { - "nullable": true, - "description": "There are no encrypted rack secrets for the initial configuration.", - "allOf": [ - { - "$ref": "#/components/schemas/EncryptedRackSecrets" - } - ] - }, - "epoch": { - "description": "Unique, monotonically increasing identifier for a configuration.", - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "members": { - "description": "All members of the current configuration and the hash of their key shares.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ConfigurationMember" - } - }, - "rack_id": { - "description": "Unique Id of the rack.", - "allOf": [ - { - "$ref": "#/components/schemas/RackUuid" - } - ] - }, - "threshold": { - "description": "The number of sleds required to reconstruct the rack secret.", - "type": "integer", - "format": "uint8", - "minimum": 0 - } - }, - "required": [ - "coordinator", - "epoch", - "members", - "rack_id", - "threshold" - ] - }, - "ConfigurationMember": { - "description": "A member entry in a trust quorum configuration.\n\nThis type is used for OpenAPI schema generation since OpenAPI v3.0.x doesn't support tuple arrays.", - "type": "object", - "properties": { - "id": { - "description": "The baseboard ID of the member.", - "allOf": [ - { - "$ref": "#/components/schemas/BaseboardId" - } - ] - }, - "share_digest": { - "description": "The SHA3-256 hash of the member's key share.", - "type": "string", - "format": "hex string (32 bytes)" - } - }, - "required": [ - "id", - "share_digest" - ] - }, - "CoordinatorStatus": { - "description": "Status of the node coordinating the reconfiguration or LRTQ upgrade.", - "type": "object", - "properties": { - "acked_prepares": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseboardId" - }, - "uniqueItems": true - }, - "config": { - "$ref": "#/components/schemas/Configuration" - } - }, - "required": [ - "acked_prepares", - "config" - ] - }, - "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" - }, - "DecryptionError": { - "description": "Error decrypting rack secrets.", - "oneOf": [ - { - "description": "An opaque error indicating decryption failed.", - "type": "string", - "enum": [ - "aead" - ] - }, - { - "description": "The length of the plaintext is not the correct size and cannot be decoded.", - "type": "string", - "enum": [ - "invalid_length" - ] - } - ] - }, - "DelegatedZvol": { - "description": "Delegate a ZFS volume to a zone", - "oneOf": [ - { - "description": "Delegate a slice of the _unencrypted_ local storage dataset present on this pool into the zone.", - "type": "object", - "properties": { - "dataset_id": { - "$ref": "#/components/schemas/DatasetUuid" - }, - "type": { - "type": "string", - "enum": [ - "local_storage_unencrypted" - ] - }, - "zpool_id": { - "$ref": "#/components/schemas/ExternalZpoolUuid" - } - }, - "required": [ - "dataset_id", - "type", - "zpool_id" - ] - }, - { - "description": "Delegate a slice of the _encrypted_ local storage dataset present on this pool into the zone.", - "type": "object", - "properties": { - "dataset_id": { - "$ref": "#/components/schemas/DatasetUuid" - }, - "type": { - "type": "string", - "enum": [ - "local_storage_encrypted" - ] - }, - "zpool_id": { - "$ref": "#/components/schemas/ExternalZpoolUuid" - } - }, - "required": [ - "dataset_id", - "type", - "zpool_id" - ] - } - ] - }, - "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" - ] - }, - "DiskIdentity": { - "description": "Uniquely identifies a disk.", - "type": "object", - "properties": { - "model": { - "type": "string" - }, - "serial": { - "type": "string" - }, - "vendor": { - "type": "string" - } - }, - "required": [ - "model", - "serial", - "vendor" - ] - }, - "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" - ] - }, - "EncryptedRackSecrets": { - "description": "All possibly relevant __encrypted__ rack secrets for _prior_ committed configurations.", - "type": "object", - "properties": { - "data": { - "description": "Encrypted data.", - "type": "string", - "format": "hex string" - }, - "salt": { - "description": "A random value used to derive the key to encrypt the rack secrets for prior committed epochs.", - "type": "string", - "format": "hex string (32 bytes)" - } - }, - "required": [ - "data", - "salt" - ] - }, - "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": { - "description": "An established connection to a bootstore peer.", - "type": "object", - "properties": { - "addr": { - "type": "string" - }, - "baseboard": { - "$ref": "#/components/schemas/Baseboard" - } - }, - "required": [ - "addr", - "baseboard" - ] - }, - "ExpungedMetadata": { - "description": "Metadata about a node being expunged from the trust quorum.", - "type": "object", - "properties": { - "epoch": { - "description": "The committed epoch, later than its current configuration at which the node learned that it had been expunged.", - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "from": { - "description": "Which node this commit information was learned from.", - "allOf": [ - { - "$ref": "#/components/schemas/BaseboardId" - } - ] - } - }, - "required": [ - "epoch", - "from" - ] - }, - "ExternalIp": { - "description": "An external IP address used by a probe.", - "type": "object", - "properties": { - "first_port": { - "description": "The first port used by the address.", - "type": "integer", - "format": "uint16", - "minimum": 0 - }, - "ip": { - "description": "The external IP address.", - "type": "string", - "format": "ip" - }, - "kind": { - "description": "The kind of address this is.", - "allOf": [ - { - "$ref": "#/components/schemas/IpKind" - } - ] - }, - "last_port": { - "description": "The last port used by the address.", - "type": "integer", - "format": "uint16", - "minimum": 0 - } - }, - "required": [ - "first_port", - "ip", - "kind", - "last_port" - ] - }, - "ExternalIpConfig": { - "description": "External IP address configuration.\n\nThis encapsulates all external addresses for an instance, with separate optional configurations for IPv4 and IPv6.", - "type": "object", - "properties": { - "v4": { - "nullable": true, - "description": "IPv4 external IP configuration.", - "allOf": [ - { - "$ref": "#/components/schemas/ExternalIpv4Config" - } - ] - }, - "v6": { - "nullable": true, - "description": "IPv6 external IP configuration.", - "allOf": [ - { - "$ref": "#/components/schemas/ExternalIpv6Config" - } - ] - } - } - }, - "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" - ] - }, - "ExternalIpv4Config": { - "type": "object", - "properties": { - "ephemeral_ip": { - "nullable": true, - "description": "An Ephemeral address for in- and outbound connectivity.", - "type": "string", - "format": "ipv4" - }, - "floating_ips": { - "description": "Additional Floating IPs for in- and outbound connectivity.", - "type": "array", - "items": { - "type": "string", - "format": "ipv4" - }, - "uniqueItems": true - }, - "source_nat": { - "nullable": true, - "description": "Source NAT configuration, for outbound-only connectivity.", - "allOf": [ - { - "$ref": "#/components/schemas/SourceNatConfigV4" - } - ] - } - }, - "required": [ - "floating_ips" - ] - }, - "ExternalIpv6Config": { - "type": "object", - "properties": { - "ephemeral_ip": { - "nullable": true, - "description": "An Ephemeral address for in- and outbound connectivity.", - "type": "string", - "format": "ipv6" - }, - "floating_ips": { - "description": "Additional Floating IPs for in- and outbound connectivity.", - "type": "array", - "items": { - "type": "string", - "format": "ipv6" - }, - "uniqueItems": true - }, - "source_nat": { - "nullable": true, - "description": "Source NAT configuration, for outbound-only connectivity.", - "allOf": [ - { - "$ref": "#/components/schemas/SourceNatConfigV6" - } - ] - } - }, - "required": [ - "floating_ips" - ] - }, - "ExternalZpoolUuid": { - "x-rust-type": { - "crate": "omicron-uuid-kinds", - "path": "omicron_uuid_kinds::ExternalZpoolUuid", - "version": "*" - }, - "type": "string", - "format": "uuid" - }, - "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 - }, - "FmdHostCase": { - "description": "A diagnosed fault case from the illumos Fault Management Daemon on a sled.", - "type": "object", - "properties": { - "code": { - "description": "Diagnostic code (e.g. \"PCIEX-8000-DJ\").", - "type": "string" - }, - "event": { - "nullable": true, - "description": "Full fault event payload as JSON, if present. Contains the fault-list with classes, certainties, affected FMRIs, and other diagnostic detail." - }, - "url": { - "description": "URL for human-readable information about this fault (e.g. `http://illumos.org/msg/PCIEX-8000-DJ`).", - "type": "string" - }, - "uuid": { - "description": "Unique identifier for this case.", - "allOf": [ - { - "$ref": "#/components/schemas/FmdHostCaseUuid" - } - ] - } - }, - "required": [ - "code", - "url", - "uuid" - ] - }, - "FmdHostCaseUuid": { - "x-rust-type": { - "crate": "omicron-uuid-kinds", - "path": "omicron_uuid_kinds::FmdHostCaseUuid", - "version": "*" - }, - "type": "string", - "format": "uuid" - }, - "FmdInventory": { - "description": "Successfully collected FMD fault data.", - "type": "object", - "properties": { - "cases": { - "title": "IdOrdMap", - "x-rust-type": { - "crate": "iddqd", - "parameters": [ - { - "$ref": "#/components/schemas/FmdHostCase" - } - ], - "path": "iddqd::IdOrdMap", - "version": "*" - }, - "type": "array", - "items": { - "$ref": "#/components/schemas/FmdHostCase" - }, - "uniqueItems": true - }, - "resources": { - "title": "IdOrdMap", - "x-rust-type": { - "crate": "iddqd", - "parameters": [ - { - "$ref": "#/components/schemas/FmdResource" - } - ], - "path": "iddqd::IdOrdMap", - "version": "*" - }, - "type": "array", - "items": { - "$ref": "#/components/schemas/FmdResource" - }, - "uniqueItems": true - } - }, - "required": [ - "cases", - "resources" - ] - }, - "FmdInventoryError": { - "description": "An error reported by sled-agent in place of an [`FmdInventory`].\n\n`kind` is a typed discriminator suitable for filtering / monitoring. `message` is a human-readable description (built via `Display`); it is informational only and should not be parsed.", - "type": "object", - "properties": { - "kind": { - "$ref": "#/components/schemas/FmdInventoryErrorKind" - }, - "message": { - "type": "string" - } - }, - "required": [ - "kind", - "message" - ] - }, - "FmdInventoryErrorKind": { - "description": "Classification of an [`FmdInventoryError`].\n\n`FmdError` is a catch-all for any FMD-side failure: the daemon was unreachable, a case/resource listing failed, or the platform doesn't have FMD at all. The accompanying message disambiguates these cases. `TooManyCases` and `TooManyResources` are first-class because exceeding those bounds is operationally distinct from a transient FMD failure.", - "oneOf": [ - { - "description": "Catch-all for FMD-side failures.", - "type": "string", - "enum": [ - "fmd_error" - ] - }, - { - "description": "Number of FMD cases exceeded [`FMD_MAX_CASES`].", - "type": "string", - "enum": [ - "too_many_cases" - ] - }, - { - "description": "Number of FMD resources exceeded [`FMD_MAX_RESOURCES`].", - "type": "string", - "enum": [ - "too_many_resources" - ] - } - ] - }, - "FmdResource": { - "description": "A resource affected by a diagnosed fault.", - "type": "object", - "properties": { - "case_id": { - "description": "UUID of the case that diagnosed this fault.", - "allOf": [ - { - "$ref": "#/components/schemas/FmdHostCaseUuid" - } - ] - }, - "faulty": { - "description": "Whether the resource is marked faulty.", - "type": "boolean" - }, - "fmri": { - "description": "Fault Management Resource Identifier (e.g. \"dev:////pci@af,0/pci1022,1483@3,5\").", - "type": "string" - }, - "invisible": { - "description": "Whether the resource is marked invisible.", - "type": "boolean" - }, - "unusable": { - "description": "Whether the resource is marked unusable.", - "type": "boolean" - }, - "uuid": { - "description": "Unique identifier for this resource entry.", - "allOf": [ - { - "$ref": "#/components/schemas/FmdResourceUuid" - } - ] - } - }, - "required": [ - "case_id", - "faulty", - "fmri", - "invisible", - "unusable", - "uuid" - ] - }, - "FmdResourceUuid": { - "x-rust-type": { - "crate": "omicron-uuid-kinds", - "path": "omicron_uuid_kinds::FmdResourceUuid", - "version": "*" - }, - "type": "string", - "format": "uuid" - }, - "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" - ] - }, - "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" - }, - "PortConfig": { - "type": "object", - "properties": { - "addresses": { - "description": "This port's addresses and optional vlan IDs", - "type": "array", - "items": { - "$ref": "#/components/schemas/UplinkAddressConfig" - } - }, - "allow_ddm_traffic": { - "description": "Whether or not to allow DDM traffic on this port", - "default": false, - "type": "boolean" - }, - "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": "Name 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/SwitchSlot" - } - ] - }, - "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/LinkFec" - } - ] - }, - "uplink_port_speed": { - "description": "Port speed.", - "allOf": [ - { - "$ref": "#/components/schemas/LinkSpeed" - } - ] - } - }, - "required": [ - "addresses", - "bgp_peers", - "port", - "routes", - "switch", - "uplink_port_speed" - ] - }, - "PrepareAndCommitRequest": { - "description": "Request to prepare and commit a trust quorum configuration.\n\nThis is the `Configuration` sent to a node that missed the `Prepare` phase.", - "type": "object", - "properties": { - "config": { - "$ref": "#/components/schemas/Configuration" - } - }, - "required": [ - "config" - ] - }, - "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.\n\nTODO: The serde deserializer does not currently verify uniqueness of dimensions.", - "type": "array", - "items": { - "$ref": "#/components/schemas/PriorityDimension" - }, - "minItems": 2, - "maxItems": 2 - }, - "PrivateIpConfig": { - "description": "VPC-private IP address configuration for a network interface.", - "oneOf": [ - { - "description": "The interface has only an IPv4 configuration.", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v4" - ] - }, - "value": { - "$ref": "#/components/schemas/PrivateIpv4Config" - } - }, - "required": [ - "type", - "value" - ] - }, - { - "description": "The interface has only an IPv6 configuration.", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v6" - ] - }, - "value": { - "$ref": "#/components/schemas/PrivateIpv6Config" - } - }, - "required": [ - "type", - "value" - ] - }, - { - "description": "The interface is dual-stack.", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "dual_stack" - ] - }, - "value": { - "type": "object", - "properties": { - "v4": { - "description": "The interface's IPv4 configuration.", - "allOf": [ - { - "$ref": "#/components/schemas/PrivateIpv4Config" - } - ] - }, - "v6": { - "description": "The interface's IPv6 configuration.", - "allOf": [ - { - "$ref": "#/components/schemas/PrivateIpv6Config" - } - ] - } - }, - "required": [ - "v4", - "v6" - ] - } - }, - "required": [ - "type", - "value" - ] - } - ] - }, - "PrivateIpv4Config": { - "description": "VPC-private IPv4 configuration for a network interface.", - "type": "object", - "properties": { - "ip": { - "description": "VPC-private IP address.", - "type": "string", - "format": "ipv4" - }, - "subnet": { - "description": "The IP subnet.", - "allOf": [ - { - "$ref": "#/components/schemas/Ipv4Net" - } - ] - }, - "transit_ips": { - "description": "Additional networks on which the interface can send / receive traffic.", - "default": [], - "type": "array", - "items": { - "$ref": "#/components/schemas/Ipv4Net" - } - } - }, - "required": [ - "ip", - "subnet" - ] - }, - "PrivateIpv6Config": { - "description": "VPC-private IPv6 configuration for a network interface.", - "type": "object", - "properties": { - "ip": { - "description": "VPC-private IP address.", - "type": "string", - "format": "ipv6" - }, - "subnet": { - "description": "The IP subnet.", - "allOf": [ - { - "$ref": "#/components/schemas/Ipv6Net" - } - ] - }, - "transit_ips": { - "description": "Additional networks on which the interface can send / receive traffic.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Ipv6Net" - } - } - }, - "required": [ - "ip", - "subnet", - "transit_ips" - ] - }, - "ProbeCreate": { - "description": "Parameters used to create a probe.", - "type": "object", - "properties": { - "external_ips": { - "description": "The external IP addresses assigned to the probe.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalIp" - } - }, - "id": { - "description": "The ID for the probe.", - "allOf": [ - { - "$ref": "#/components/schemas/ProbeUuid" - } - ] - }, - "interface": { - "description": "The probe's networking interface.", - "allOf": [ - { - "$ref": "#/components/schemas/NetworkInterface" - } - ] - } - }, - "required": [ - "external_ips", - "id", - "interface" - ] - }, - "ProbeSet": { - "description": "A set of probes that the target sled should run.", - "type": "object", - "properties": { - "probes": { - "title": "IdHashMap", - "description": "The exact set of probes to run.", - "x-rust-type": { - "crate": "iddqd", - "parameters": [ - { - "$ref": "#/components/schemas/ProbeCreate" - } - ], - "path": "iddqd::IdHashMap", - "version": "*" - }, - "type": "array", - "items": { - "$ref": "#/components/schemas/ProbeCreate" - }, - "uniqueItems": true - } - }, - "required": [ - "probes" - ] - }, - "ProbeUuid": { - "x-rust-type": { - "crate": "omicron-uuid-kinds", - "path": "omicron_uuid_kinds::ProbeUuid", - "version": "*" - }, - "type": "string", - "format": "uuid" - }, - "ProxyCommitRequest": { - "description": "Request to proxy a commit operation to another trust quorum node.", - "type": "object", - "properties": { - "destination": { - "description": "The target node to proxy the request to.", - "allOf": [ - { - "$ref": "#/components/schemas/BaseboardId" - } - ] - }, - "request": { - "description": "The commit request to proxy.", - "allOf": [ - { - "$ref": "#/components/schemas/CommitRequest" - } - ] - } - }, - "required": [ - "destination", - "request" - ] - }, - "ProxyPrepareAndCommitRequest": { - "description": "Request to proxy a prepare-and-commit operation to another trust quorum node.", - "type": "object", - "properties": { - "destination": { - "description": "The target node to proxy the request to.", - "allOf": [ - { - "$ref": "#/components/schemas/BaseboardId" - } - ] - }, - "request": { - "description": "The prepare-and-commit request to proxy.", - "allOf": [ - { - "$ref": "#/components/schemas/PrepareAndCommitRequest" - } - ] - } - }, - "required": [ - "destination", - "request" - ] - }, - "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 - }, - "RackNetworkConfig": { - "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": "ip" - }, - "infra_ip_last": { - "description": "Last ip address to be used for configuring network infrastructure", - "type": "string", - "format": "ip" - }, - "ports": { - "description": "Uplinks for connecting the rack to external networks", - "allOf": [ - { - "$ref": "#/components/schemas/UplinkPorts" - } - ] - }, - "rack_subnet": { - "$ref": "#/components/schemas/Ipv6Net" - } - }, - "required": [ - "bgp", - "infra_ip_first", - "infra_ip_last", - "ports", - "rack_subnet" - ] - }, - "RackSecretReconstructError": { - "description": "Error reconstructing a rack secret from shares.", - "oneOf": [ - { - "type": "object", - "properties": { - "combine": { - "$ref": "#/components/schemas/CombineError" - } - }, - "required": [ - "combine" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "size": { - "$ref": "#/components/schemas/InvalidRackSecretSizeError" - } - }, - "required": [ - "size" - ], - "additionalProperties": false - } - ] - }, - "RackUuid": { - "x-rust-type": { - "crate": "omicron-uuid-kinds", - "path": "omicron_uuid_kinds::RackUuid", - "version": "*" - }, - "type": "string", - "format": "uuid" - }, - "ReconfigureMsg": { - "description": "A request from Nexus informing a node to start coordinating a reconfiguration.", - "type": "object", - "properties": { - "epoch": { - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "last_committed_epoch": { - "nullable": true, - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "members": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseboardId" - }, - "uniqueItems": true - }, - "rack_id": { - "$ref": "#/components/schemas/RackUuid" - }, - "threshold": { - "type": "integer", - "format": "uint8", - "minimum": 0 - } - }, - "required": [ - "epoch", - "members", - "rack_id", - "threshold" - ] - }, - "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" - ] - } - ] - }, - "RouterLifetimeConfig": { - "description": "Router lifetime in seconds for unnumbered BGP peers", - "type": "integer", - "format": "uint16", - "minimum": 0, - "maximum": 9000 - }, - "RouterPeerType": { - "oneOf": [ - { - "type": "object", - "properties": { - "router_lifetime": { - "description": "Router lifetime in seconds for unnumbered BGP peers.", - "allOf": [ - { - "$ref": "#/components/schemas/RouterLifetimeConfig" - } - ] - }, - "type": { - "type": "string", - "enum": [ - "unnumbered" - ] - } - }, - "required": [ - "router_lifetime", - "type" - ] - }, - { - "type": "object", - "properties": { - "src_addr": { - "nullable": true, - "description": "Optional local IP address to bind when establishing outbound TCP connections to this peer. If `None`, the OS selects the source address.", - "default": null, - "type": "string", - "format": "ip" - }, - "target_addr": { - "description": "Target IP address for numbered BGP peers.", - "type": "string", - "format": "ip" - }, - "type": { - "type": "string", - "enum": [ - "numbered" - ] - } - }, - "required": [ - "target_addr", - "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" - ] - }, - "ServiceZoneNatEntries": { - "title": "IdOrdMap", - "description": "Description of all NAT entries for control plane services.", - "x-rust-type": { - "crate": "iddqd", - "parameters": [ - { - "$ref": "#/components/schemas/ServiceZoneNatEntry" - } - ], - "path": "iddqd::IdOrdMap", - "version": "*" - }, - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceZoneNatEntry" - }, - "uniqueItems": true - }, - "ServiceZoneNatEntry": { - "type": "object", - "properties": { - "kind": { - "$ref": "#/components/schemas/ServiceZoneNatKind" - }, - "nic_mac": { - "$ref": "#/components/schemas/MacAddr" - }, - "sled_underlay_ip": { - "type": "string", - "format": "ipv6" - }, - "vni": { - "$ref": "#/components/schemas/Vni" - }, - "zone_id": { - "$ref": "#/components/schemas/OmicronZoneUuid" - } - }, - "required": [ - "kind", - "nic_mac", - "sled_underlay_ip", - "vni", - "zone_id" - ] - }, - "ServiceZoneNatKind": { - "oneOf": [ - { - "type": "object", - "properties": { - "kind": { - "type": "string", - "enum": [ - "boundary_ntp" - ] - }, - "snat_cfg": { - "$ref": "#/components/schemas/SourceNatConfigGeneric" - } - }, - "required": [ - "kind", - "snat_cfg" - ] - }, - { - "type": "object", - "properties": { - "external_ip": { - "type": "string", - "format": "ip" - }, - "kind": { - "type": "string", - "enum": [ - "external_dns" - ] - } - }, - "required": [ - "external_ip", - "kind" - ] - }, - { - "type": "object", - "properties": { - "external_ip": { - "type": "string", - "format": "ip" - }, - "kind": { - "type": "string", - "enum": [ - "nexus" - ] - } - }, - "required": [ - "external_ip", - "kind" - ] - } - ] - }, - "SingleMeasurementInventory": { - "description": "An attempt at resolving a single measurement file to a valid path", - "type": "object", - "properties": { - "path": { - "type": "string", - "format": "Utf8PathBuf" - }, - "result": { - "$ref": "#/components/schemas/ConfigReconcilerInventoryResult" - } - }, - "required": [ - "path", - "result" - ] - }, - "SledConfigGeneration": { - "description": "Generation numbers stored in the database, used for optimistic concurrency control", - "x-rust-type": { - "crate": "omicron-generation-kinds", - "path": "omicron_generation_kinds::SledConfigGeneration", - "version": "*" - }, - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "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" - ] - }, - "SmbiosType1Input": { - "type": "object", - "properties": { - "manufacturer": { - "type": "string" - }, - "product_name": { - "type": "string" - }, - "serial_number": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "uint64", - "minimum": 0 - } - }, - "required": [ - "manufacturer", - "product_name", - "serial_number", - "version" - ], - "additionalProperties": false - }, - "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 - }, - "SourceNatConfigGeneric": { - "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" - ] - }, - "SourceNatConfigV4": { - "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": "ipv4" - }, - "last_port": { - "description": "The last port used for source NAT, also inclusive.", - "type": "integer", - "format": "uint16", - "minimum": 0 - } - }, - "required": [ - "first_port", - "ip", - "last_port" - ] - }, - "SourceNatConfigV6": { - "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": "ipv6" - }, - "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.", - "allOf": [ - { - "$ref": "#/components/schemas/RackUuid" - } - ] - }, - "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": { - "description": "State of a support bundle.", - "type": "string", - "enum": [ - "complete", - "incomplete" - ] - }, - "SupportBundleUuid": { - "x-rust-type": { - "crate": "omicron-uuid-kinds", - "path": "omicron_uuid_kinds::SupportBundleUuid", - "version": "*" - }, - "type": "string", - "format": "uuid" - }, - "SvcEnabledNotOnline": { - "description": "Information about an SMF service that is enabled but not running", - "type": "object", - "properties": { - "fmri": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/SvcEnabledNotOnlineState" - }, - "zone": { - "type": "string" - } - }, - "required": [ - "fmri", - "state", - "zone" - ] - }, - "SvcEnabledNotOnlineState": { - "description": "Each service instance is always in a well-defined state based on its dependencies, the results of the execution of its methods, and its potential contracts events.\n\nThis enum contains all possible states except `online`, `disabled`, `uninitialized` and `legacy_run`. We only want to represent states that represent some sort of \"unhealthy\" or \"unexpected\" state. See for more information.", - "oneOf": [ - { - "description": "The instance is enabled, but not yet running or available to run.", - "type": "string", - "enum": [ - "offline" - ] - }, - { - "description": "The instance is enabled and running or available to run. It is, however, functioning at a limited capacity in comparison to normal operation.", - "type": "string", - "enum": [ - "degraded" - ] - }, - { - "description": "The instance is enabled, but not able to run.", - "type": "string", - "enum": [ - "maintenance" - ] - }, - { - "description": "An instance whose state is absent or unrecognized. Note: as per `man svcs`, \"Absent or unrecognized states are denoted by a question mark (?) character\". So there is not an \"unrecognized\" state per se in svcs.", - "type": "string", - "enum": [ - "unrecognized" - ] - } - ] - }, - "SvcsEnabledNotOnline": { - "description": "Lists services that are enabled but not in an online state if any, the time the sample was collected, and any errors that may have ocurred during the collection", - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "type": "string" - } - }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SvcEnabledNotOnline" - } - }, - "time_of_status": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "errors", - "services", - "time_of_status" - ] - }, - "SvcsEnabledNotOnlineResult": { - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "svcs_enabled_not_online" - ] - }, - "value": { - "$ref": "#/components/schemas/SvcsEnabledNotOnline" - } - }, - "required": [ - "type", - "value" - ] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "svcs_cmd_error" - ] - }, - "value": { - "$ref": "#/components/schemas/SvcsError" - } - }, - "required": [ - "type", - "value" - ] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "data_unavailable" - ] - } - }, - "required": [ - "type" - ] - } - ] - }, - "SvcsError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "time_of_status": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "error", - "time_of_status" - ] - }, - "SwitchSlot": { - "description": "Identifies switch physical location", - "oneOf": [ - { - "description": "Switch in upper slot", - "type": "string", - "enum": [ - "switch0" - ] - }, - { - "description": "Switch in lower slot", - "type": "string", - "enum": [ - "switch1" - ] - } - ] - }, - "SystemNetworkingConfig": { - "description": "All configuration needed to set up system-level networking.", - "type": "object", - "properties": { - "blueprint_external_networking_config": { - "nullable": true, - "description": "External networking configuration specified by blueprints.", - "allOf": [ - { - "$ref": "#/components/schemas/BlueprintExternalNetworkingConfig" - } - ] - }, - "rack_network_config": { - "$ref": "#/components/schemas/RackNetworkConfig" - } - }, - "required": [ - "rack_network_config" - ] - }, - "TrustQuorumNetworkConfig": { - "description": "Network configuration used to bring up the control plane.\n\nThis type mirrors `bootstore::schemes::v0::NetworkConfig` but adds `JsonSchema` for API compatibility.", - "type": "object", - "properties": { - "blob": { - "description": "A serialized blob of configuration data (base64 encoded).", - "type": "string" - }, - "generation": { - "type": "integer", - "format": "uint64", - "minimum": 0 - } - }, - "required": [ - "blob", - "generation" - ] - }, - "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" - } - } - }, - "UplinkAddress": { - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "addrconf" - ] - } - }, - "required": [ - "type" - ] - }, - { - "type": "object", - "properties": { - "ip_net": { - "$ref": "#/components/schemas/IpNet" - }, - "type": { - "type": "string", - "enum": [ - "static" - ] - } - }, - "required": [ - "ip_net", - "type" - ] - } - ] - }, - "UplinkAddressConfig": { - "type": "object", - "properties": { - "address": { - "description": "The address to be used on the uplink.", - "allOf": [ - { - "$ref": "#/components/schemas/UplinkAddress" - } - ] - }, - "vlan_id": { - "nullable": true, - "description": "The VLAN id (if any) associated with this address.", - "default": null, - "type": "integer", - "format": "uint16", - "minimum": 0 - } - }, - "required": [ - "address" - ] - }, - "UplinkPorts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PortConfig" - }, - "minItems": 1 - }, - "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 - }, - "VirtioSocket": { - "description": "A socket device that presents a virtio-socket interface to the guest.", - "type": "object", - "properties": { - "guest_cid": { - "description": "The guest's Context ID.", - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "pci_path": { - "description": "The PCI path at which to attach this device.", - "allOf": [ - { - "$ref": "#/components/schemas/PciPath" - } - ] - } - }, - "required": [ - "guest_cid", - "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": { - "description": "Request body for VMM disk snapshot requests.", - "type": "object", - "properties": { - "snapshot_id": { - "type": "string", - "format": "uuid" - } - }, - "required": [ - "snapshot_id" - ] - }, - "VmmIssueDiskSnapshotRequestResponse": { - "description": "Response for VMM disk snapshot requests.", - "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.", - "allOf": [ - { - "$ref": "#/components/schemas/InstanceSpec" - } - ] - }, - "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" - ] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "icmp6" - ] - }, - "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" - ] - }, - "WriteNetworkConfigRequest": { - "description": "Structure for requests from Nexus to sled-agent to write a new [`SystemNetworkingConfig`] into the replicated bootstore.\n\n[`WriteNetworkConfigRequest`] INTENTIONALLY does not have a `From` implementation from prior API versions. It is critically important that sled-agent not attempt to rewrite old [`SystemNetworkingConfig`] types to the latest version. For more about this, see the comments on the relevant endpoint in `sled-agent-api`.", - "type": "object", - "properties": { - "body": { - "$ref": "#/components/schemas/SystemNetworkingConfig" - }, - "generation": { - "type": "integer", - "format": "uint64", - "minimum": 0 - } - }, - "required": [ - "body", - "generation" - ] - }, - "ZoneArtifactInventory": { - "description": "Inventory representation of a single zone artifact on a boot disk.\n\nPart of [`ManifestBootInventory`].", - "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" - ] - }, - "ZpoolHealth": { - "oneOf": [ - { - "description": "The device is online and functioning.", - "type": "string", - "enum": [ - "online" - ] - }, - { - "description": "One or more components are degraded or faulted, but sufficient replicas exist to continue functioning.", - "type": "string", - "enum": [ - "degraded" - ] - }, - { - "description": "One or more components are degraded or faulted, and insufficient replicas exist to continue functioning.", - "type": "string", - "enum": [ - "faulted" - ] - }, - { - "description": "The device was explicitly taken offline by \"zpool offline\".", - "type": "string", - "enum": [ - "offline" - ] - }, - { - "description": "The device was physically removed.", - "type": "string", - "enum": [ - "removed" - ] - }, - { - "description": "The device could not be opened.", - "type": "string", - "enum": [ - "unavailable" - ] - } - ] - }, - "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" - }, - "Rot": { - "description": "A Root of Trust (RoT) which provides measurments and signed attestations.", - "oneOf": [ - { - "description": "The per-sled RoT in an Oxide rack.", - "type": "string", - "enum": [ - "oxide" - ] - } - ] - }, - "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 b66905d4184..21b3d0bb47f 120000 --- a/openapi/sled-agent/sled-agent-latest.json +++ b/openapi/sled-agent/sled-agent-latest.json @@ -1 +1 @@ -sled-agent-51.0.0-f0475d.json \ No newline at end of file +sled-agent-50.0.0-240307.json \ No newline at end of file diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index cee45c0e985..65b86d13185 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -35,7 +35,6 @@ api_versions!([ // | example for the next person. // v // (next_int, IDENT), - (51, RETIRE_UP_TO_VERSION_23), (50, TYPED_SLED_CONFIG_GENERATION), (49, ADD_UPDATE_DISPOSITION), (48, ALLOW_DDM_TRAFFIC), diff --git a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs index 496c9b0dbe1..df872a67bcb 100644 --- a/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_fmd_to_inventory/inventory.rs @@ -15,6 +15,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::Baseboard; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; +use crate::v1::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -22,7 +23,6 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v37; -use crate::v51::inventory::SledRole; /// A diagnosed fault case from the illumos Fault Management Daemon on a sled. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, JsonSchema)] diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/debug.rs b/sled-agent/types/versions/src/add_switch_zone_operator_policy/debug.rs similarity index 100% rename from sled-agent/types/versions/src/retire_up_to_version_23/debug.rs rename to sled-agent/types/versions/src/add_switch_zone_operator_policy/debug.rs diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs b/sled-agent/types/versions/src/add_switch_zone_operator_policy/mod.rs similarity index 52% rename from sled-agent/types/versions/src/retire_up_to_version_23/mod.rs rename to sled-agent/types/versions/src/add_switch_zone_operator_policy/mod.rs index bc7b4ed65dc..9fc959ca481 100644 --- a/sled-agent/types/versions/src/retire_up_to_version_23/mod.rs +++ b/sled-agent/types/versions/src/add_switch_zone_operator_policy/mod.rs @@ -2,10 +2,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -//! Version `RETIRE_UP_TO_VERSION_23` of the Sled Agent API. +//! Version `ADD_SWITCH_ZONE_OPERATOR_POLICY` of the Sled Agent API. +//! +//! This version added the operator switch zone policy debug endpoint. -/// Types here were moved from retired versions because they were the latest -/// version of that type. pub mod debug; -pub mod instance; -pub mod inventory; diff --git a/sled-agent/types/versions/src/add_update_disposition/inventory.rs b/sled-agent/types/versions/src/add_update_disposition/inventory.rs index cfe04306dca..d9e05cc9a2f 100644 --- a/sled-agent/types/versions/src/add_update_disposition/inventory.rs +++ b/sled-agent/types/versions/src/add_update_disposition/inventory.rs @@ -22,6 +22,7 @@ use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::OrphanedDataset; use crate::v1::inventory::RemoveMupdateOverrideInventory; use crate::v1::inventory::SledCpuFamily; +use crate::v1::inventory::SledRole; use crate::v11::inventory::OmicronZoneConfig; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSingleMeasurement; @@ -30,7 +31,6 @@ use crate::v24::inventory::InventoryZpool; use crate::v40::inventory::FmdInventory; use crate::v40::inventory::FmdInventoryError; use crate::v46::inventory::SvcsEnabledNotOnlineResult; -use crate::v51::inventory::SledRole; use chrono::DateTime; use chrono::Utc; use iddqd::IdOrdMap; diff --git a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs index 2660f78b2af..29b62d4a71e 100644 --- a/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_zpool_health_to_inventory/inventory.rs @@ -17,6 +17,7 @@ use std::net::SocketAddrV6; use crate::v1; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; +use crate::v1::inventory::SledRole; use crate::v12::inventory::SvcsInMaintenanceResult; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; @@ -24,7 +25,6 @@ use crate::v14::inventory::OmicronSledConfig; use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v22; -use crate::v51::inventory::SledRole; #[derive( Clone, diff --git a/sled-agent/types/versions/src/initial/instance.rs b/sled-agent/types/versions/src/initial/instance.rs index e989fa6028c..ade8c898f8a 100644 --- a/sled-agent/types/versions/src/initial/instance.rs +++ b/sled-agent/types/versions/src/initial/instance.rs @@ -22,6 +22,12 @@ use uuid::Uuid; use super::inventory::NetworkInterface; use super::inventory::SourceNatConfig; +/// Path parameters for VMM requests. +#[derive(Deserialize, JsonSchema)] +pub struct VmmPathParam { + pub propolis_id: PropolisUuid, +} + /// Path parameters for VMM disk snapshot requests. #[derive(Deserialize, JsonSchema)] pub struct VmmIssueDiskSnapshotRequestPathParam { diff --git a/sled-agent/types/versions/src/initial/inventory.rs b/sled-agent/types/versions/src/initial/inventory.rs index e65d42f5916..3e5cdccb8a1 100644 --- a/sled-agent/types/versions/src/initial/inventory.rs +++ b/sled-agent/types/versions/src/initial/inventory.rs @@ -142,6 +142,22 @@ pub struct InventoryDataset { pub compression: String, } +/// Describes the role of the sled within the rack. +/// +/// Note that this may change if the sled is physically moved +/// within the rack. +#[derive( + Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, +)] +#[serde(rename_all = "snake_case")] +pub enum SledRole { + /// The sled is a general compute sled. + Gimlet, + /// The sled is attached to the network switch, and has additional + /// responsibilities. + Scrimlet, +} + /// Describes the desired contents of a host phase 2 slot (i.e., the boot /// partition on one of the internal M.2 drives). #[derive( diff --git a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs index ca33d5b11a4..e20e8aa448a 100644 --- a/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs +++ b/sled-agent/types/versions/src/inventory_baseboard_id/inventory.rs @@ -15,6 +15,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::Baseboard; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; +use crate::v1::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -24,7 +25,6 @@ use crate::v24::inventory::InventoryZpool; use crate::v37::inventory::SvcsEnabledNotOnlineResult; use crate::v40; use crate::v40::inventory::{FmdInventory, FmdInventoryError}; -use crate::v51::inventory::SledRole; /// Identity and basic status information about this sled agent #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/latest.rs b/sled-agent/types/versions/src/latest.rs index bbdc9ae873a..2d817805b5d 100644 --- a/sled-agent/types/versions/src/latest.rs +++ b/sled-agent/types/versions/src/latest.rs @@ -32,7 +32,7 @@ pub mod dataset { } pub mod debug { - pub use crate::v51::debug::OperatorSwitchZonePolicy; + pub use crate::v3::debug::OperatorSwitchZonePolicy; } pub mod diagnostics { @@ -107,6 +107,7 @@ pub mod instance { pub use crate::v1::instance::VmmIssueDiskSnapshotRequestBody; pub use crate::v1::instance::VmmIssueDiskSnapshotRequestPathParam; pub use crate::v1::instance::VmmIssueDiskSnapshotRequestResponse; + pub use crate::v1::instance::VmmPathParam; pub use crate::v1::instance::VmmPutStateBody; pub use crate::v1::instance::VmmPutStateResponse; pub use crate::v1::instance::VmmRuntimeState; @@ -114,7 +115,6 @@ pub mod instance { pub use crate::v1::instance::VmmStateRequested; pub use crate::v1::instance::VmmUnregisterResponse; pub use crate::v1::instance::VpcPathParam; - pub use crate::v51::instance::VmmPathParam; pub use crate::v7::instance::InstanceMulticastBody; pub use crate::v7::instance::InstanceMulticastMembership; @@ -153,9 +153,9 @@ pub mod inventory { pub use crate::v1::inventory::RemoveMupdateOverrideBootSuccessInventory; pub use crate::v1::inventory::RemoveMupdateOverrideInventory; pub use crate::v1::inventory::SledCpuFamily; + pub use crate::v1::inventory::SledRole; pub use crate::v1::inventory::ZoneArtifactInventory; pub use crate::v1::inventory::ZoneKind; - pub use crate::v51::inventory::SledRole; pub use crate::v10::inventory::NetworkInterface; diff --git a/sled-agent/types/versions/src/lib.rs b/sled-agent/types/versions/src/lib.rs index b23f0e68d47..3f3b3982494 100644 --- a/sled-agent/types/versions/src/lib.rs +++ b/sled-agent/types/versions/src/lib.rs @@ -67,6 +67,8 @@ pub mod v26; pub mod v28; #[path = "add_vsock_component/mod.rs"] pub mod v29; +#[path = "add_switch_zone_operator_policy/mod.rs"] +pub mod v3; #[path = "stronger_bgp_unnumbered_types/mod.rs"] pub mod v30; #[path = "add_icmpv6_firewall_support/mod.rs"] @@ -103,8 +105,6 @@ pub mod v48; pub mod v49; #[path = "typed_sled_config_generation/mod.rs"] pub mod v50; -#[path = "retire_up_to_version_23/mod.rs"] -pub mod v51; #[path = "add_probe_put_endpoint/mod.rs"] pub mod v6; #[path = "multicast_support/mod.rs"] diff --git a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs index 887614c10df..0cb3fb5fd09 100644 --- a/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs +++ b/sled-agent/types/versions/src/modify_services_in_inventory/inventory.rs @@ -15,6 +15,7 @@ use std::net::SocketAddrV6; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; +use crate::v1::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -22,7 +23,6 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24; use crate::v24::inventory::InventoryZpool; -use crate::v51::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs index 1a3b4ec51ad..3f807a1bcb6 100644 --- a/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_enabled_not_online_state/inventory.rs @@ -16,6 +16,7 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; +use crate::v1::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -24,7 +25,6 @@ use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v34; use crate::v34::inventory::SvcsError; -use crate::v51::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs index 998c6c6a3db..60ed469d9d1 100644 --- a/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs +++ b/sled-agent/types/versions/src/modify_svc_state_enum/inventory.rs @@ -18,6 +18,7 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; +use crate::v1::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -29,7 +30,6 @@ use crate::v34::inventory::SvcsError; use crate::v37; use crate::v40::inventory::{FmdInventory, FmdInventoryError}; use crate::v43; -use crate::v51::inventory::SledRole; /// Each service instance is always in a well-defined state based on its /// dependencies, the results of the execution of its methods, and its potential diff --git a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs index 5b8a5bacb2e..0ab67537a1b 100644 --- a/sled-agent/types/versions/src/modify_svcs_types/inventory.rs +++ b/sled-agent/types/versions/src/modify_svcs_types/inventory.rs @@ -16,6 +16,7 @@ use strum::EnumIter; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; +use crate::v1::inventory::SledRole; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; @@ -23,7 +24,6 @@ use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; use crate::v24::inventory::InventoryZpool; use crate::v28; -use crate::v51::inventory::SledRole; #[derive( Debug, diff --git a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs index 2336348345c..9179c57e0e6 100644 --- a/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs +++ b/sled-agent/types/versions/src/remove_health_monitor_keep_checks/inventory.rs @@ -16,13 +16,13 @@ use std::net::SocketAddrV6; use crate::v1::inventory::InventoryDataset; use crate::v1::inventory::InventoryDisk; use crate::v1::inventory::InventoryZpool; +use crate::v1::inventory::SledRole; use crate::v12::inventory::SvcsInMaintenanceResult; use crate::v14::inventory::ConfigReconcilerInventoryStatus; use crate::v14::inventory::OmicronFileSourceResolverInventory; use crate::v14::inventory::OmicronSledConfig; use crate::v16::inventory::ConfigReconcilerInventory; use crate::v16::inventory::SingleMeasurementInventory; -use crate::v51::inventory::SledRole; /// Identity and basic status information about this sled agent #[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)] diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs b/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs deleted file mode 100644 index d31f0ffec9b..00000000000 --- a/sled-agent/types/versions/src/retire_up_to_version_23/instance.rs +++ /dev/null @@ -1,13 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -use omicron_uuid_kinds::PropolisUuid; -use schemars::JsonSchema; -use serde::Deserialize; - -/// Path parameters for VMM requests. -#[derive(Deserialize, JsonSchema)] -pub struct VmmPathParam { - pub propolis_id: PropolisUuid, -} diff --git a/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs b/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs deleted file mode 100644 index c406efeafe3..00000000000 --- a/sled-agent/types/versions/src/retire_up_to_version_23/inventory.rs +++ /dev/null @@ -1,22 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -/// Describes the role of the sled within the rack. -/// -/// Note that this may change if the sled is physically moved -/// within the rack. -#[derive( - Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, -)] -#[serde(rename_all = "snake_case")] -pub enum SledRole { - /// The sled is a general compute sled. - Gimlet, - /// The sled is attached to the network switch, and has additional - /// responsibilities. - Scrimlet, -} diff --git a/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs b/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs index 817ebc17e0c..ad9bb01c51c 100644 --- a/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs +++ b/sled-agent/types/versions/src/typed_sled_config_generation/inventory.rs @@ -21,6 +21,7 @@ use std::net::SocketAddrV6; use std::time::Duration; use crate::v1::disk::{DatasetConfig, OmicronPhysicalDiskConfig}; +use crate::v1::inventory::SledRole; use crate::v1::inventory::{ BootPartitionContents, ConfigReconcilerInventoryResult, HostPhase2DesiredSlots, InventoryDataset, InventoryDisk, OrphanedDataset, @@ -36,7 +37,6 @@ use crate::v40::inventory::{FmdInventory, FmdInventoryError}; use crate::v46::inventory::SvcsEnabledNotOnlineResult; use crate::v49; use crate::v49::inventory::OmicronSledUpdateDisposition; -use crate::v51::inventory::SledRole; /// Describes the set of Reconfigurator-managed configuration elements of a sled #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq, Eq)] From 43bd59b98e56dac52cd3cab9aad81bf82ac7b20e Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Tue, 1 Sep 2026 16:09:13 +0000 Subject: [PATCH 33/34] pass doctest --- .../src/add_nexus_lockstep_port_to_inventory/inventory.rs | 2 +- sled-agent/types/versions/src/initial/inventory.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs index 6f704eff1a6..ff3389e0a15 100644 --- a/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs +++ b/sled-agent/types/versions/src/add_nexus_lockstep_port_to_inventory/inventory.rs @@ -217,7 +217,7 @@ pub enum ConfigReconcilerInventoryStatus { /// /// This variant does not include the `OmicronSledConfig` used in the last /// attempt, because that's always available via - /// [`ConfigReconcilerInventory::last_reconciled_config`]. + /// `ConfigReconcilerInventory::last_reconciled_config`. Idle { completed_at: DateTime, ran_for: Duration }, } diff --git a/sled-agent/types/versions/src/initial/inventory.rs b/sled-agent/types/versions/src/initial/inventory.rs index 3e5cdccb8a1..a04d29024d0 100644 --- a/sled-agent/types/versions/src/initial/inventory.rs +++ b/sled-agent/types/versions/src/initial/inventory.rs @@ -808,7 +808,7 @@ pub enum ConfigReconcilerInventoryStatus { /// /// This variant does not include the `OmicronSledConfig` used in the last /// attempt, because that's always available via - /// [`ConfigReconcilerInventory::last_reconciled_config`]. + /// `ConfigReconcilerInventory::last_reconciled_config`. Idle { completed_at: DateTime, ran_for: Duration }, } From 64680ee41334e1b2c8d33cc0c3bc2079567b0b8d Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Tue, 1 Sep 2026 17:02:44 +0000 Subject: [PATCH 34/34] forgot to git add openapi dir --- .../sled-agent/sled-agent-50.0.0-240307.json | 10995 ++++++++++++++++ 1 file changed, 10995 insertions(+) create mode 100644 openapi/sled-agent/sled-agent-50.0.0-240307.json diff --git a/openapi/sled-agent/sled-agent-50.0.0-240307.json b/openapi/sled-agent/sled-agent-50.0.0-240307.json new file mode 100644 index 00000000000..61817695b64 --- /dev/null +++ b/openapi/sled-agent/sled-agent-50.0.0-240307.json @@ -0,0 +1,10995 @@ +{ + "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": "50.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" + } + } + } + }, + "/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" + } + } + } + }, + "/local-storage": { + "post": { + "summary": "Create a local storage dataset", + "operationId": "local_storage_dataset_ensure", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocalStorageDatasetEnsureRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "summary": "Delete a local storage dataset", + "operationId": "local_storage_dataset_delete", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocalStorageDatasetDeleteRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/network-bootstore-config": { + "put": { + "operationId": "write_network_bootstore_config", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WriteNetworkConfigRequest" + } + } + }, + "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" + } + } + } + }, + "/probes": { + "put": { + "summary": "Update the entire set of probe zones on this sled.", + "description": "Probe zones are used to debug networking configuration. They look similar to instances, in that they have an OPTE port on a VPC subnet and external addresses, but no actual VM.", + "operationId": "probes_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProbeSet" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/rot/{rot}/attest": { + "post": { + "summary": "Return attestation over recorded measurments and nonce from the RoT.", + "operationId": "rot_attest", + "parameters": [ + { + "in": "path", + "name": "rot", + "description": "Which RoT to use", + "required": true, + "schema": { + "$ref": "#/components/schemas/Rot" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nonce" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attestation" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/rot/{rot}/certificate-chain": { + "get": { + "summary": "Return the certificate chain for the attestation signer from the RoT.", + "operationId": "rot_certificate_chain", + "parameters": [ + { + "in": "path", + "name": "rot", + "description": "Which RoT to use", + "required": true, + "schema": { + "$ref": "#/components/schemas/Rot" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateChain" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/rot/{rot}/measurement-log": { + "get": { + "summary": "Return the set of measurments recorded by the RoT.", + "operationId": "rot_measurement_log", + "parameters": [ + { + "in": "path", + "name": "rot", + "description": "Which RoT to use", + "required": true, + "schema": { + "$ref": "#/components/schemas/Rot" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MeasurementLog" + } + } + } + }, + "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" + } + } + } + }, + "/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" + } + } + } + }, + "/trust-quorum/commit": { + "put": { + "summary": "Commit a trust quorum configuration", + "operationId": "trust_quorum_commit", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommitRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/configuration": { + "post": { + "summary": "Initiate a trust quorum reconfiguration", + "operationId": "trust_quorum_reconfigure", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReconfigureMsg" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/coordinator-status": { + "get": { + "summary": "Get the coordinator status if this node is coordinating a reconfiguration", + "operationId": "trust_quorum_coordinator_status", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CoordinatorStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/network-config": { + "get": { + "summary": "Get the current network config from trust quorum", + "operationId": "trust_quorum_network_config_get", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TrustQuorumNetworkConfig" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "summary": "Update the network config in trust quorum", + "operationId": "trust_quorum_network_config_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TrustQuorumNetworkConfig" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/prepare-and-commit": { + "put": { + "summary": "Attempt to prepare and commit a trust quorum configuration", + "operationId": "trust_quorum_prepare_and_commit", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrepareAndCommitRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommitStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/proxy/commit": { + "put": { + "summary": "Proxy a commit operation to another trust quorum node", + "operationId": "trust_quorum_proxy_commit", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProxyCommitRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/proxy/prepare-and-commit": { + "put": { + "summary": "Proxy a prepare-and-commit operation to another trust quorum node", + "operationId": "trust_quorum_proxy_prepare_and_commit", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProxyPrepareAndCommitRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommitStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/proxy/status": { + "get": { + "summary": "Proxy a status request to another trust quorum node", + "operationId": "trust_quorum_proxy_status", + "parameters": [ + { + "in": "query", + "name": "part_number", + "description": "Oxide Part Number", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "serial_number", + "description": "Serial number (unique for a given part number)", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/status": { + "get": { + "summary": "Get the status of this trust quorum node", + "operationId": "trust_quorum_status", + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeStatus" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/trust-quorum/upgrade": { + "post": { + "summary": "Initiate an upgrade from LRTQ", + "operationId": "trust_quorum_upgrade_from_lrtq", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LrtqUpgradeMsg" + } + } + }, + "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}/attached-subnets": { + "put": { + "summary": "Update the subnets attached to an instance.", + "operationId": "vmm_put_attached_subnets", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachedSubnets" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "summary": "Attach a subnet to an instance.", + "operationId": "vmm_post_attached_subnet", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachedSubnet" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "summary": "Delete all subnets attached to an instance.", + "operationId": "vmm_delete_attached_subnets", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "responses": { + "204": { + "description": "successful deletion" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/vmms/{propolis_id}/attached-subnets/{subnet}": { + "delete": { + "summary": "Detach a subnet from an instance.", + "operationId": "vmm_delete_attached_subnet", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + }, + { + "in": "path", + "name": "subnet", + "required": true, + "schema": { + "$ref": "#/components/schemas/IpNet" + } + } + ], + "responses": { + "204": { + "description": "successful deletion" + }, + "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}/multicast-group": { + "put": { + "operationId": "vmm_join_multicast_group", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceMulticastBody" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "operationId": "vmm_leave_multicast_group", + "parameters": [ + { + "in": "path", + "name": "propolis_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/PropolisUuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceMulticastBody" + } + } + }, + "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": "successful operation", + "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" + ] + }, + "Alarm": { + "description": "An alarm indicating a protocol invariant violation.", + "oneOf": [ + { + "description": "Different configurations found for the same epoch.\n\nReason: Nexus creates configurations and stores them in CRDB before sending them to a coordinator of its choosing. Nexus will not send the same reconfiguration request to different coordinators. If it does those coordinators will generate different key shares. However, since Nexus will not tell different nodes to coordinate the same configuration, this state should be impossible to reach.", + "type": "object", + "properties": { + "mismatched_configurations": { + "type": "object", + "properties": { + "config1": { + "$ref": "#/components/schemas/Configuration" + }, + "config2": { + "$ref": "#/components/schemas/Configuration" + }, + "from": { + "description": "Either a stringified `BaseboardId` or \"Nexus\".", + "type": "string" + } + }, + "required": [ + "config1", + "config2", + "from" + ] + } + }, + "required": [ + "mismatched_configurations" + ], + "additionalProperties": false + }, + { + "description": "The `keyShareComputer` could not compute this node's share.\n\nReason: A threshold of valid key shares were received based on the the share digests in the Configuration. However, computation of the share still failed. This should be impossible.", + "type": "object", + "properties": { + "share_computation_failed": { + "type": "object", + "properties": { + "epoch": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "err": { + "$ref": "#/components/schemas/CombineError" + } + }, + "required": [ + "epoch", + "err" + ] + } + }, + "required": [ + "share_computation_failed" + ], + "additionalProperties": false + }, + { + "description": "We started collecting shares for a committed configuration, but we no longer have that configuration in our persistent state.", + "type": "object", + "properties": { + "committed_configuration_lost": { + "type": "object", + "properties": { + "collecting_epoch": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "latest_committed_epoch": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "collecting_epoch", + "latest_committed_epoch" + ] + } + }, + "required": [ + "committed_configuration_lost" + ], + "additionalProperties": false + }, + { + "description": "Decrypting the encrypted rack secrets failed when presented with a `valid` RackSecret.\n\n`Configuration` membership contains the hashes of each valid share. All shares utilized to reconstruct the rack secret were validated against these hashes, and the rack secret was reconstructed. However, using the rack secret to derive encryption keys and decrypt the secrets from old configurations still failed. This should never be possible, and therefore we raise an alarm.", + "type": "object", + "properties": { + "rack_secret_decryption_failed": { + "type": "object", + "properties": { + "epoch": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "err": { + "$ref": "#/components/schemas/DecryptionError" + } + }, + "required": [ + "epoch", + "err" + ] + } + }, + "required": [ + "rack_secret_decryption_failed" + ], + "additionalProperties": false + }, + { + "description": "Reconstructing the rack secret failed when presented with `valid` shares.\n\n`Configuration` membership contains the hashes of each valid share. All shares utilized to reconstruct the rack secret were validated against these hashes, and yet, the reconstruction still failed. This indicates either a bit flip in a share after validation, or, more likely, an invalid hash.", + "type": "object", + "properties": { + "rack_secret_reconstruction_failed": { + "type": "object", + "properties": { + "epoch": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "err": { + "$ref": "#/components/schemas/RackSecretReconstructError" + } + }, + "required": [ + "epoch", + "err" + ] + } + }, + "required": [ + "rack_secret_reconstruction_failed" + ], + "additionalProperties": false + } + ] + }, + "ArtifactConfig": { + "description": "Artifact configuration.\n\nThis type is used in both GET (response) and PUT (request) operations.", + "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": { + "description": "Request body for copying artifacts from a depot.", + "type": "object", + "properties": { + "depot_base_url": { + "type": "string" + } + }, + "required": [ + "depot_base_url" + ] + }, + "ArtifactCopyFromDepotResponse": { + "description": "Response for copying artifacts from a depot.", + "type": "object" + }, + "ArtifactListResponse": { + "description": "Response for listing artifacts.", + "type": "object", + "properties": { + "generation": { + "$ref": "#/components/schemas/Generation" + }, + "list": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "required": [ + "generation", + "list" + ] + }, + "ArtifactPutResponse": { + "description": "Response for putting an artifact.", + "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" + ] + }, + "AttachedSubnet": { + "description": "A subnet attached to a single instance.", + "type": "object", + "properties": { + "kind": { + "description": "The kind of subnet that is attached.", + "allOf": [ + { + "$ref": "#/components/schemas/AttachedSubnetKind" + } + ] + }, + "subnet": { + "description": "The IP subnet.", + "allOf": [ + { + "$ref": "#/components/schemas/IpNet" + } + ] + } + }, + "required": [ + "kind", + "subnet" + ] + }, + "AttachedSubnetKind": { + "description": "The kind of attached subnet.", + "oneOf": [ + { + "description": "This is a VPC subnet.", + "type": "string", + "enum": [ + "vpc" + ] + }, + { + "description": "This is an external subnet.", + "type": "string", + "enum": [ + "external" + ] + } + ] + }, + "AttachedSubnets": { + "description": "Subnets attached to a single instance.", + "type": "object", + "properties": { + "subnets": { + "title": "IdOrdMap", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/AttachedSubnet" + } + ], + "path": "iddqd::IdOrdMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/AttachedSubnet" + }, + "uniqueItems": true + } + }, + "required": [ + "subnets" + ] + }, + "Attestation": { + "description": "An RoT produced attestation that represents a signature over the provided [`Nonce`] combined with the [`MeasurementLog`] and signed by a key certified by the [`CertificateChain`].", + "oneOf": [ + { + "description": "An Ed25519 signature.", + "type": "object", + "properties": { + "ed25519": { + "type": "string", + "format": "hex string (64 bytes)" + } + }, + "required": [ + "ed25519" + ], + "additionalProperties": false + } + ] + }, + "Baseboard": { + "description": "Describes properties that should uniquely identify a Gimlet.\n\nThis is the frozen, original form of the baseboard as published by Sled Agent API versions 1 through 39. Newer versions report a [`BaseboardId`] instead. The `Unknown` variant is retained here solely to preserve the blessed schema of these older versions; it is no longer produced.\n\n[`BaseboardId`]: sled_hardware_types::BaseboardId", + "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.\n\nThis 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/SwitchSlot" + } + }, + "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" + }, + "max_paths": { + "description": "Maximum number of paths to use when multiple \"best paths\" exist", + "default": 1, + "allOf": [ + { + "$ref": "#/components/schemas/MaxPathConfig" + } + ] + }, + "originate": { + "description": "The set of prefixes for the BGP router to originate.", + "type": "array", + "items": { + "$ref": "#/components/schemas/IpNet" + } + }, + "shaper": { + "nullable": true, + "description": "Shaper to apply to outgoing messages.", + "default": null, + "type": "string" + } + }, + "required": [ + "asn", + "originate" + ] + }, + "BgpPeerConfig": { + "description": "A BGP peer configuration for a port.", + "type": "object", + "properties": { + "addr": { + "description": "Address of the peer (numbered or unnumbered).", + "allOf": [ + { + "$ref": "#/components/schemas/RouterPeerType" + } + ] + }, + "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 + }, + "BlueprintExternalNetworkingConfig": { + "description": "External networking configuration controlled by Reconfigurator via blueprints.", + "type": "object", + "properties": { + "blueprint_external_networking_generation": { + "description": "The current generation number of the blueprint's external networking config.\n\nThis generation number is only bumped when a new blueprint is produced that changes the external networking configuration in some way.", + "allOf": [ + { + "$ref": "#/components/schemas/Generation" + } + ] + }, + "service_zone_nat_entries": { + "description": "Set of all Omicron service zone NAT entries.", + "allOf": [ + { + "$ref": "#/components/schemas/ServiceZoneNatEntries" + } + ] + } + }, + "required": [ + "blueprint_external_networking_generation", + "service_zone_nat_entries" + ] + }, + "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": { + "description": "Status of the local bootstore node.", + "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 + }, + "CertificateChain": { + "description": "A chain of PEM-encoded X.509 certificates (RFC5280) that link an attestation signing key to a trusted PKI root.", + "type": "array", + "items": { + "type": "string" + } + }, + "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" + } + ] + }, + "CombineError": { + "type": "string", + "enum": [ + "too_few_shares", + "duplicate_x_coordinates", + "invalid_share_lengths", + "invalid_share_id" + ] + }, + "CommitRequest": { + "description": "Request to commit a trust quorum configuration at a given epoch.", + "type": "object", + "properties": { + "epoch": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "rack_id": { + "$ref": "#/components/schemas/RackUuid" + } + }, + "required": [ + "epoch", + "rack_id" + ] + }, + "CommitStatus": { + "description": "Whether or not a configuration has been committed or is still underway.", + "type": "string", + "enum": [ + "committed", + "pending" + ] + }, + "Component": { + "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/VirtioSocket" + }, + "type": { + "type": "string", + "enum": [ + "virtio_socket" + ] + } + }, + "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" + ] + } + ] + }, + "Configuration": { + "description": "The configuration for a given epoch.\n\nOnly valid for non-lrtq configurations.", + "type": "object", + "properties": { + "coordinator": { + "description": "Who was the coordinator of this reconfiguration?", + "allOf": [ + { + "$ref": "#/components/schemas/BaseboardId" + } + ] + }, + "encrypted_rack_secrets": { + "nullable": true, + "description": "There are no encrypted rack secrets for the initial configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/EncryptedRackSecrets" + } + ] + }, + "epoch": { + "description": "Unique, monotonically increasing identifier for a configuration.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "members": { + "description": "All members of the current configuration and the hash of their key shares.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationMember" + } + }, + "rack_id": { + "description": "Unique Id of the rack.", + "allOf": [ + { + "$ref": "#/components/schemas/RackUuid" + } + ] + }, + "threshold": { + "description": "The number of sleds required to reconstruct the rack secret.", + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "required": [ + "coordinator", + "epoch", + "members", + "rack_id", + "threshold" + ] + }, + "ConfigurationMember": { + "description": "A member entry in a trust quorum configuration.\n\nThis type is used for OpenAPI schema generation since OpenAPI v3.0.x doesn't support tuple arrays.", + "type": "object", + "properties": { + "id": { + "description": "The baseboard ID of the member.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseboardId" + } + ] + }, + "share_digest": { + "description": "The SHA3-256 hash of the member's key share.", + "type": "string", + "format": "hex string (32 bytes)" + } + }, + "required": [ + "id", + "share_digest" + ] + }, + "CoordinatorStatus": { + "description": "Status of the node coordinating the reconfiguration or LRTQ upgrade.", + "type": "object", + "properties": { + "acked_prepares": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseboardId" + }, + "uniqueItems": true + }, + "config": { + "$ref": "#/components/schemas/Configuration" + } + }, + "required": [ + "acked_prepares", + "config" + ] + }, + "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" + }, + "DecryptionError": { + "description": "Error decrypting rack secrets.", + "oneOf": [ + { + "description": "An opaque error indicating decryption failed.", + "type": "string", + "enum": [ + "aead" + ] + }, + { + "description": "The length of the plaintext is not the correct size and cannot be decoded.", + "type": "string", + "enum": [ + "invalid_length" + ] + } + ] + }, + "DelegatedZvol": { + "description": "Delegate a ZFS volume to a zone", + "oneOf": [ + { + "description": "Delegate a slice of the _unencrypted_ local storage dataset present on this pool into the zone.", + "type": "object", + "properties": { + "dataset_id": { + "$ref": "#/components/schemas/DatasetUuid" + }, + "type": { + "type": "string", + "enum": [ + "local_storage_unencrypted" + ] + }, + "zpool_id": { + "$ref": "#/components/schemas/ExternalZpoolUuid" + } + }, + "required": [ + "dataset_id", + "type", + "zpool_id" + ] + }, + { + "description": "Delegate a slice of the _encrypted_ local storage dataset present on this pool into the zone.", + "type": "object", + "properties": { + "dataset_id": { + "$ref": "#/components/schemas/DatasetUuid" + }, + "type": { + "type": "string", + "enum": [ + "local_storage_encrypted" + ] + }, + "zpool_id": { + "$ref": "#/components/schemas/ExternalZpoolUuid" + } + }, + "required": [ + "dataset_id", + "type", + "zpool_id" + ] + } + ] + }, + "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" + ] + }, + "DiskIdentity": { + "description": "Uniquely identifies a disk.", + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "serial": { + "type": "string" + }, + "vendor": { + "type": "string" + } + }, + "required": [ + "model", + "serial", + "vendor" + ] + }, + "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" + ] + }, + "EncryptedRackSecrets": { + "description": "All possibly relevant __encrypted__ rack secrets for _prior_ committed configurations.", + "type": "object", + "properties": { + "data": { + "description": "Encrypted data.", + "type": "string", + "format": "hex string" + }, + "salt": { + "description": "A random value used to derive the key to encrypt the rack secrets for prior committed epochs.", + "type": "string", + "format": "hex string (32 bytes)" + } + }, + "required": [ + "data", + "salt" + ] + }, + "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": { + "description": "An established connection to a bootstore peer.", + "type": "object", + "properties": { + "addr": { + "type": "string" + }, + "baseboard": { + "$ref": "#/components/schemas/Baseboard" + } + }, + "required": [ + "addr", + "baseboard" + ] + }, + "ExpungedMetadata": { + "description": "Metadata about a node being expunged from the trust quorum.", + "type": "object", + "properties": { + "epoch": { + "description": "The committed epoch, later than its current configuration at which the node learned that it had been expunged.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from": { + "description": "Which node this commit information was learned from.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseboardId" + } + ] + } + }, + "required": [ + "epoch", + "from" + ] + }, + "ExternalIp": { + "description": "An external IP address used by a probe.", + "type": "object", + "properties": { + "first_port": { + "description": "The first port used by the address.", + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "ip": { + "description": "The external IP address.", + "type": "string", + "format": "ip" + }, + "kind": { + "description": "The kind of address this is.", + "allOf": [ + { + "$ref": "#/components/schemas/IpKind" + } + ] + }, + "last_port": { + "description": "The last port used by the address.", + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "first_port", + "ip", + "kind", + "last_port" + ] + }, + "ExternalIpConfig": { + "description": "External IP address configuration.\n\nThis encapsulates all external addresses for an instance, with separate optional configurations for IPv4 and IPv6.", + "type": "object", + "properties": { + "v4": { + "nullable": true, + "description": "IPv4 external IP configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalIpv4Config" + } + ] + }, + "v6": { + "nullable": true, + "description": "IPv6 external IP configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/ExternalIpv6Config" + } + ] + } + } + }, + "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" + ] + }, + "ExternalIpv4Config": { + "type": "object", + "properties": { + "ephemeral_ip": { + "nullable": true, + "description": "An Ephemeral address for in- and outbound connectivity.", + "type": "string", + "format": "ipv4" + }, + "floating_ips": { + "description": "Additional Floating IPs for in- and outbound connectivity.", + "type": "array", + "items": { + "type": "string", + "format": "ipv4" + }, + "uniqueItems": true + }, + "source_nat": { + "nullable": true, + "description": "Source NAT configuration, for outbound-only connectivity.", + "allOf": [ + { + "$ref": "#/components/schemas/SourceNatConfigV4" + } + ] + } + }, + "required": [ + "floating_ips" + ] + }, + "ExternalIpv6Config": { + "type": "object", + "properties": { + "ephemeral_ip": { + "nullable": true, + "description": "An Ephemeral address for in- and outbound connectivity.", + "type": "string", + "format": "ipv6" + }, + "floating_ips": { + "description": "Additional Floating IPs for in- and outbound connectivity.", + "type": "array", + "items": { + "type": "string", + "format": "ipv6" + }, + "uniqueItems": true + }, + "source_nat": { + "nullable": true, + "description": "Source NAT configuration, for outbound-only connectivity.", + "allOf": [ + { + "$ref": "#/components/schemas/SourceNatConfigV6" + } + ] + } + }, + "required": [ + "floating_ips" + ] + }, + "ExternalZpoolUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::ExternalZpoolUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "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 + }, + "FmdHostCase": { + "description": "A diagnosed fault case from the illumos Fault Management Daemon on a sled.", + "type": "object", + "properties": { + "code": { + "description": "Diagnostic code (e.g. \"PCIEX-8000-DJ\").", + "type": "string" + }, + "event": { + "nullable": true, + "description": "Full fault event payload as JSON, if present. Contains the fault-list with classes, certainties, affected FMRIs, and other diagnostic detail." + }, + "url": { + "description": "URL for human-readable information about this fault (e.g. `http://illumos.org/msg/PCIEX-8000-DJ`).", + "type": "string" + }, + "uuid": { + "description": "Unique identifier for this case.", + "allOf": [ + { + "$ref": "#/components/schemas/FmdHostCaseUuid" + } + ] + } + }, + "required": [ + "code", + "url", + "uuid" + ] + }, + "FmdHostCaseUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::FmdHostCaseUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "FmdInventory": { + "description": "Successfully collected FMD fault data.", + "type": "object", + "properties": { + "cases": { + "title": "IdOrdMap", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/FmdHostCase" + } + ], + "path": "iddqd::IdOrdMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/FmdHostCase" + }, + "uniqueItems": true + }, + "resources": { + "title": "IdOrdMap", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/FmdResource" + } + ], + "path": "iddqd::IdOrdMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/FmdResource" + }, + "uniqueItems": true + } + }, + "required": [ + "cases", + "resources" + ] + }, + "FmdInventoryError": { + "description": "An error reported by sled-agent in place of an [`FmdInventory`].\n\n`kind` is a typed discriminator suitable for filtering / monitoring. `message` is a human-readable description (built via `Display`); it is informational only and should not be parsed.", + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/FmdInventoryErrorKind" + }, + "message": { + "type": "string" + } + }, + "required": [ + "kind", + "message" + ] + }, + "FmdInventoryErrorKind": { + "description": "Classification of an [`FmdInventoryError`].\n\n`FmdError` is a catch-all for any FMD-side failure: the daemon was unreachable, a case/resource listing failed, or the platform doesn't have FMD at all. The accompanying message disambiguates these cases. `TooManyCases` and `TooManyResources` are first-class because exceeding those bounds is operationally distinct from a transient FMD failure.", + "oneOf": [ + { + "description": "Catch-all for FMD-side failures.", + "type": "string", + "enum": [ + "fmd_error" + ] + }, + { + "description": "Number of FMD cases exceeded [`FMD_MAX_CASES`].", + "type": "string", + "enum": [ + "too_many_cases" + ] + }, + { + "description": "Number of FMD resources exceeded [`FMD_MAX_RESOURCES`].", + "type": "string", + "enum": [ + "too_many_resources" + ] + } + ] + }, + "FmdResource": { + "description": "A resource affected by a diagnosed fault.", + "type": "object", + "properties": { + "case_id": { + "description": "UUID of the case that diagnosed this fault.", + "allOf": [ + { + "$ref": "#/components/schemas/FmdHostCaseUuid" + } + ] + }, + "faulty": { + "description": "Whether the resource is marked faulty.", + "type": "boolean" + }, + "fmri": { + "description": "Fault Management Resource Identifier (e.g. \"dev:////pci@af,0/pci1022,1483@3,5\").", + "type": "string" + }, + "invisible": { + "description": "Whether the resource is marked invisible.", + "type": "boolean" + }, + "unusable": { + "description": "Whether the resource is marked unusable.", + "type": "boolean" + }, + "uuid": { + "description": "Unique identifier for this resource entry.", + "allOf": [ + { + "$ref": "#/components/schemas/FmdResourceUuid" + } + ] + } + }, + "required": [ + "case_id", + "faulty", + "fmri", + "invisible", + "unusable", + "uuid" + ] + }, + "FmdResourceUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::FmdResourceUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "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" + ] + }, + "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" + }, + "PortConfig": { + "type": "object", + "properties": { + "addresses": { + "description": "This port's addresses and optional vlan IDs", + "type": "array", + "items": { + "$ref": "#/components/schemas/UplinkAddressConfig" + } + }, + "allow_ddm_traffic": { + "description": "Whether or not to allow DDM traffic on this port", + "default": false, + "type": "boolean" + }, + "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": "Name 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/SwitchSlot" + } + ] + }, + "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/LinkFec" + } + ] + }, + "uplink_port_speed": { + "description": "Port speed.", + "allOf": [ + { + "$ref": "#/components/schemas/LinkSpeed" + } + ] + } + }, + "required": [ + "addresses", + "bgp_peers", + "port", + "routes", + "switch", + "uplink_port_speed" + ] + }, + "PrepareAndCommitRequest": { + "description": "Request to prepare and commit a trust quorum configuration.\n\nThis is the `Configuration` sent to a node that missed the `Prepare` phase.", + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/Configuration" + } + }, + "required": [ + "config" + ] + }, + "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.\n\nTODO: The serde deserializer does not currently verify uniqueness of dimensions.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PriorityDimension" + }, + "minItems": 2, + "maxItems": 2 + }, + "PrivateIpConfig": { + "description": "VPC-private IP address configuration for a network interface.", + "oneOf": [ + { + "description": "The interface has only an IPv4 configuration.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v4" + ] + }, + "value": { + "$ref": "#/components/schemas/PrivateIpv4Config" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "description": "The interface has only an IPv6 configuration.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v6" + ] + }, + "value": { + "$ref": "#/components/schemas/PrivateIpv6Config" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "description": "The interface is dual-stack.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dual_stack" + ] + }, + "value": { + "type": "object", + "properties": { + "v4": { + "description": "The interface's IPv4 configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/PrivateIpv4Config" + } + ] + }, + "v6": { + "description": "The interface's IPv6 configuration.", + "allOf": [ + { + "$ref": "#/components/schemas/PrivateIpv6Config" + } + ] + } + }, + "required": [ + "v4", + "v6" + ] + } + }, + "required": [ + "type", + "value" + ] + } + ] + }, + "PrivateIpv4Config": { + "description": "VPC-private IPv4 configuration for a network interface.", + "type": "object", + "properties": { + "ip": { + "description": "VPC-private IP address.", + "type": "string", + "format": "ipv4" + }, + "subnet": { + "description": "The IP subnet.", + "allOf": [ + { + "$ref": "#/components/schemas/Ipv4Net" + } + ] + }, + "transit_ips": { + "description": "Additional networks on which the interface can send / receive traffic.", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/Ipv4Net" + } + } + }, + "required": [ + "ip", + "subnet" + ] + }, + "PrivateIpv6Config": { + "description": "VPC-private IPv6 configuration for a network interface.", + "type": "object", + "properties": { + "ip": { + "description": "VPC-private IP address.", + "type": "string", + "format": "ipv6" + }, + "subnet": { + "description": "The IP subnet.", + "allOf": [ + { + "$ref": "#/components/schemas/Ipv6Net" + } + ] + }, + "transit_ips": { + "description": "Additional networks on which the interface can send / receive traffic.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Ipv6Net" + } + } + }, + "required": [ + "ip", + "subnet", + "transit_ips" + ] + }, + "ProbeCreate": { + "description": "Parameters used to create a probe.", + "type": "object", + "properties": { + "external_ips": { + "description": "The external IP addresses assigned to the probe.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIp" + } + }, + "id": { + "description": "The ID for the probe.", + "allOf": [ + { + "$ref": "#/components/schemas/ProbeUuid" + } + ] + }, + "interface": { + "description": "The probe's networking interface.", + "allOf": [ + { + "$ref": "#/components/schemas/NetworkInterface" + } + ] + } + }, + "required": [ + "external_ips", + "id", + "interface" + ] + }, + "ProbeSet": { + "description": "A set of probes that the target sled should run.", + "type": "object", + "properties": { + "probes": { + "title": "IdHashMap", + "description": "The exact set of probes to run.", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/ProbeCreate" + } + ], + "path": "iddqd::IdHashMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/ProbeCreate" + }, + "uniqueItems": true + } + }, + "required": [ + "probes" + ] + }, + "ProbeUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::ProbeUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "ProxyCommitRequest": { + "description": "Request to proxy a commit operation to another trust quorum node.", + "type": "object", + "properties": { + "destination": { + "description": "The target node to proxy the request to.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseboardId" + } + ] + }, + "request": { + "description": "The commit request to proxy.", + "allOf": [ + { + "$ref": "#/components/schemas/CommitRequest" + } + ] + } + }, + "required": [ + "destination", + "request" + ] + }, + "ProxyPrepareAndCommitRequest": { + "description": "Request to proxy a prepare-and-commit operation to another trust quorum node.", + "type": "object", + "properties": { + "destination": { + "description": "The target node to proxy the request to.", + "allOf": [ + { + "$ref": "#/components/schemas/BaseboardId" + } + ] + }, + "request": { + "description": "The prepare-and-commit request to proxy.", + "allOf": [ + { + "$ref": "#/components/schemas/PrepareAndCommitRequest" + } + ] + } + }, + "required": [ + "destination", + "request" + ] + }, + "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 + }, + "RackNetworkConfig": { + "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": "ip" + }, + "infra_ip_last": { + "description": "Last ip address to be used for configuring network infrastructure", + "type": "string", + "format": "ip" + }, + "ports": { + "description": "Uplinks for connecting the rack to external networks", + "allOf": [ + { + "$ref": "#/components/schemas/UplinkPorts" + } + ] + }, + "rack_subnet": { + "$ref": "#/components/schemas/Ipv6Net" + } + }, + "required": [ + "bgp", + "infra_ip_first", + "infra_ip_last", + "ports", + "rack_subnet" + ] + }, + "RackSecretReconstructError": { + "description": "Error reconstructing a rack secret from shares.", + "oneOf": [ + { + "type": "object", + "properties": { + "combine": { + "$ref": "#/components/schemas/CombineError" + } + }, + "required": [ + "combine" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "size": { + "$ref": "#/components/schemas/InvalidRackSecretSizeError" + } + }, + "required": [ + "size" + ], + "additionalProperties": false + } + ] + }, + "RackUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::RackUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "ReconfigureMsg": { + "description": "A request from Nexus informing a node to start coordinating a reconfiguration.", + "type": "object", + "properties": { + "epoch": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "last_committed_epoch": { + "nullable": true, + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseboardId" + }, + "uniqueItems": true + }, + "rack_id": { + "$ref": "#/components/schemas/RackUuid" + }, + "threshold": { + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "required": [ + "epoch", + "members", + "rack_id", + "threshold" + ] + }, + "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" + ] + } + ] + }, + "RouterLifetimeConfig": { + "description": "Router lifetime in seconds for unnumbered BGP peers", + "type": "integer", + "format": "uint16", + "minimum": 0, + "maximum": 9000 + }, + "RouterPeerType": { + "oneOf": [ + { + "type": "object", + "properties": { + "router_lifetime": { + "description": "Router lifetime in seconds for unnumbered BGP peers.", + "allOf": [ + { + "$ref": "#/components/schemas/RouterLifetimeConfig" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "unnumbered" + ] + } + }, + "required": [ + "router_lifetime", + "type" + ] + }, + { + "type": "object", + "properties": { + "src_addr": { + "nullable": true, + "description": "Optional local IP address to bind when establishing outbound TCP connections to this peer. If `None`, the OS selects the source address.", + "default": null, + "type": "string", + "format": "ip" + }, + "target_addr": { + "description": "Target IP address for numbered BGP peers.", + "type": "string", + "format": "ip" + }, + "type": { + "type": "string", + "enum": [ + "numbered" + ] + } + }, + "required": [ + "target_addr", + "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" + ] + }, + "ServiceZoneNatEntries": { + "title": "IdOrdMap", + "description": "Description of all NAT entries for control plane services.", + "x-rust-type": { + "crate": "iddqd", + "parameters": [ + { + "$ref": "#/components/schemas/ServiceZoneNatEntry" + } + ], + "path": "iddqd::IdOrdMap", + "version": "*" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceZoneNatEntry" + }, + "uniqueItems": true + }, + "ServiceZoneNatEntry": { + "type": "object", + "properties": { + "kind": { + "$ref": "#/components/schemas/ServiceZoneNatKind" + }, + "nic_mac": { + "$ref": "#/components/schemas/MacAddr" + }, + "sled_underlay_ip": { + "type": "string", + "format": "ipv6" + }, + "vni": { + "$ref": "#/components/schemas/Vni" + }, + "zone_id": { + "$ref": "#/components/schemas/OmicronZoneUuid" + } + }, + "required": [ + "kind", + "nic_mac", + "sled_underlay_ip", + "vni", + "zone_id" + ] + }, + "ServiceZoneNatKind": { + "oneOf": [ + { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "boundary_ntp" + ] + }, + "snat_cfg": { + "$ref": "#/components/schemas/SourceNatConfigGeneric" + } + }, + "required": [ + "kind", + "snat_cfg" + ] + }, + { + "type": "object", + "properties": { + "external_ip": { + "type": "string", + "format": "ip" + }, + "kind": { + "type": "string", + "enum": [ + "external_dns" + ] + } + }, + "required": [ + "external_ip", + "kind" + ] + }, + { + "type": "object", + "properties": { + "external_ip": { + "type": "string", + "format": "ip" + }, + "kind": { + "type": "string", + "enum": [ + "nexus" + ] + } + }, + "required": [ + "external_ip", + "kind" + ] + } + ] + }, + "SingleMeasurementInventory": { + "description": "An attempt at resolving a single measurement file to a valid path", + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "Utf8PathBuf" + }, + "result": { + "$ref": "#/components/schemas/ConfigReconcilerInventoryResult" + } + }, + "required": [ + "path", + "result" + ] + }, + "SledConfigGeneration": { + "description": "Generation numbers stored in the database, used for optimistic concurrency control", + "x-rust-type": { + "crate": "omicron-generation-kinds", + "path": "omicron_generation_kinds::SledConfigGeneration", + "version": "*" + }, + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "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" + ] + }, + "SmbiosType1Input": { + "type": "object", + "properties": { + "manufacturer": { + "type": "string" + }, + "product_name": { + "type": "string" + }, + "serial_number": { + "type": "string" + }, + "version": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "manufacturer", + "product_name", + "serial_number", + "version" + ], + "additionalProperties": false + }, + "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 + }, + "SourceNatConfigGeneric": { + "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" + ] + }, + "SourceNatConfigV4": { + "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": "ipv4" + }, + "last_port": { + "description": "The last port used for source NAT, also inclusive.", + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "first_port", + "ip", + "last_port" + ] + }, + "SourceNatConfigV6": { + "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": "ipv6" + }, + "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.", + "allOf": [ + { + "$ref": "#/components/schemas/RackUuid" + } + ] + }, + "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": { + "description": "State of a support bundle.", + "type": "string", + "enum": [ + "complete", + "incomplete" + ] + }, + "SupportBundleUuid": { + "x-rust-type": { + "crate": "omicron-uuid-kinds", + "path": "omicron_uuid_kinds::SupportBundleUuid", + "version": "*" + }, + "type": "string", + "format": "uuid" + }, + "SvcEnabledNotOnline": { + "description": "Information about an SMF service that is enabled but not running", + "type": "object", + "properties": { + "fmri": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/SvcEnabledNotOnlineState" + }, + "zone": { + "type": "string" + } + }, + "required": [ + "fmri", + "state", + "zone" + ] + }, + "SvcEnabledNotOnlineState": { + "description": "Each service instance is always in a well-defined state based on its dependencies, the results of the execution of its methods, and its potential contracts events.\n\nThis enum contains all possible states except `online`, `disabled`, `uninitialized` and `legacy_run`. We only want to represent states that represent some sort of \"unhealthy\" or \"unexpected\" state. See for more information.", + "oneOf": [ + { + "description": "The instance is enabled, but not yet running or available to run.", + "type": "string", + "enum": [ + "offline" + ] + }, + { + "description": "The instance is enabled and running or available to run. It is, however, functioning at a limited capacity in comparison to normal operation.", + "type": "string", + "enum": [ + "degraded" + ] + }, + { + "description": "The instance is enabled, but not able to run.", + "type": "string", + "enum": [ + "maintenance" + ] + }, + { + "description": "An instance whose state is absent or unrecognized. Note: as per `man svcs`, \"Absent or unrecognized states are denoted by a question mark (?) character\". So there is not an \"unrecognized\" state per se in svcs.", + "type": "string", + "enum": [ + "unrecognized" + ] + } + ] + }, + "SvcsEnabledNotOnline": { + "description": "Lists services that are enabled but not in an online state if any, the time the sample was collected, and any errors that may have ocurred during the collection", + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "type": "string" + } + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SvcEnabledNotOnline" + } + }, + "time_of_status": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "errors", + "services", + "time_of_status" + ] + }, + "SvcsEnabledNotOnlineResult": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "svcs_enabled_not_online" + ] + }, + "value": { + "$ref": "#/components/schemas/SvcsEnabledNotOnline" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "svcs_cmd_error" + ] + }, + "value": { + "$ref": "#/components/schemas/SvcsError" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "data_unavailable" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "SvcsError": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "time_of_status": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "error", + "time_of_status" + ] + }, + "SwitchSlot": { + "description": "Identifies switch physical location", + "oneOf": [ + { + "description": "Switch in upper slot", + "type": "string", + "enum": [ + "switch0" + ] + }, + { + "description": "Switch in lower slot", + "type": "string", + "enum": [ + "switch1" + ] + } + ] + }, + "SystemNetworkingConfig": { + "description": "All configuration needed to set up system-level networking.", + "type": "object", + "properties": { + "blueprint_external_networking_config": { + "nullable": true, + "description": "External networking configuration specified by blueprints.", + "allOf": [ + { + "$ref": "#/components/schemas/BlueprintExternalNetworkingConfig" + } + ] + }, + "rack_network_config": { + "$ref": "#/components/schemas/RackNetworkConfig" + } + }, + "required": [ + "rack_network_config" + ] + }, + "TrustQuorumNetworkConfig": { + "description": "Network configuration used to bring up the control plane.\n\nThis type mirrors `bootstore::schemes::v0::NetworkConfig` but adds `JsonSchema` for API compatibility.", + "type": "object", + "properties": { + "blob": { + "description": "A serialized blob of configuration data (base64 encoded).", + "type": "string" + }, + "generation": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "blob", + "generation" + ] + }, + "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" + } + } + }, + "UplinkAddress": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "addrconf" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "ip_net": { + "$ref": "#/components/schemas/IpNet" + }, + "type": { + "type": "string", + "enum": [ + "static" + ] + } + }, + "required": [ + "ip_net", + "type" + ] + } + ] + }, + "UplinkAddressConfig": { + "type": "object", + "properties": { + "address": { + "description": "The address to be used on the uplink.", + "allOf": [ + { + "$ref": "#/components/schemas/UplinkAddress" + } + ] + }, + "vlan_id": { + "nullable": true, + "description": "The VLAN id (if any) associated with this address.", + "default": null, + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "required": [ + "address" + ] + }, + "UplinkPorts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortConfig" + }, + "minItems": 1 + }, + "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 + }, + "VirtioSocket": { + "description": "A socket device that presents a virtio-socket interface to the guest.", + "type": "object", + "properties": { + "guest_cid": { + "description": "The guest's Context ID.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pci_path": { + "description": "The PCI path at which to attach this device.", + "allOf": [ + { + "$ref": "#/components/schemas/PciPath" + } + ] + } + }, + "required": [ + "guest_cid", + "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": { + "description": "Request body for VMM disk snapshot requests.", + "type": "object", + "properties": { + "snapshot_id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "snapshot_id" + ] + }, + "VmmIssueDiskSnapshotRequestResponse": { + "description": "Response for VMM disk snapshot requests.", + "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.", + "allOf": [ + { + "$ref": "#/components/schemas/InstanceSpec" + } + ] + }, + "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" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "icmp6" + ] + }, + "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" + ] + }, + "WriteNetworkConfigRequest": { + "description": "Structure for requests from Nexus to sled-agent to write a new [`SystemNetworkingConfig`] into the replicated bootstore.\n\n[`WriteNetworkConfigRequest`] INTENTIONALLY does not have a `From` implementation from prior API versions. It is critically important that sled-agent not attempt to rewrite old [`SystemNetworkingConfig`] types to the latest version. For more about this, see the comments on the relevant endpoint in `sled-agent-api`.", + "type": "object", + "properties": { + "body": { + "$ref": "#/components/schemas/SystemNetworkingConfig" + }, + "generation": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "required": [ + "body", + "generation" + ] + }, + "ZoneArtifactInventory": { + "description": "Inventory representation of a single zone artifact on a boot disk.\n\nPart of [`ManifestBootInventory`].", + "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" + ] + }, + "ZpoolHealth": { + "oneOf": [ + { + "description": "The device is online and functioning.", + "type": "string", + "enum": [ + "online" + ] + }, + { + "description": "One or more components are degraded or faulted, but sufficient replicas exist to continue functioning.", + "type": "string", + "enum": [ + "degraded" + ] + }, + { + "description": "One or more components are degraded or faulted, and insufficient replicas exist to continue functioning.", + "type": "string", + "enum": [ + "faulted" + ] + }, + { + "description": "The device was explicitly taken offline by \"zpool offline\".", + "type": "string", + "enum": [ + "offline" + ] + }, + { + "description": "The device was physically removed.", + "type": "string", + "enum": [ + "removed" + ] + }, + { + "description": "The device could not be opened.", + "type": "string", + "enum": [ + "unavailable" + ] + } + ] + }, + "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" + }, + "Rot": { + "description": "A Root of Trust (RoT) which provides measurments and signed attestations.", + "oneOf": [ + { + "description": "The per-sled RoT in an Oxide rack.", + "type": "string", + "enum": [ + "oxide" + ] + } + ] + }, + "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" + } + } + } + } + } + } +}