From ae95ab880e9cf9360dcd53b7f58f21cda7243d59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 05:39:57 +0000 Subject: [PATCH 1/2] Bump dropshot from `0ae4dd3` to `21e86a2` Bumps [dropshot](https://github.com/oxidecomputer/dropshot) from `0ae4dd3` to `21e86a2`. - [Release notes](https://github.com/oxidecomputer/dropshot/releases) - [Commits](https://github.com/oxidecomputer/dropshot/compare/0ae4dd3601b56e5cf0d706889ba1d46470e27326...21e86a2de595ff83e21328385fa7444ac1401236) --- updated-dependencies: - dependency-name: dropshot dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 973f1d7dd24..9e7f2e72295 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1178,7 +1178,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dropshot" version = "0.8.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot?branch=main#0ae4dd3601b56e5cf0d706889ba1d46470e27326" +source = "git+https://github.com/oxidecomputer/dropshot?branch=main#21e86a2de595ff83e21328385fa7444ac1401236" dependencies = [ "async-stream", "async-trait", @@ -1218,7 +1218,7 @@ dependencies = [ [[package]] name = "dropshot_endpoint" version = "0.8.1-dev" -source = "git+https://github.com/oxidecomputer/dropshot?branch=main#0ae4dd3601b56e5cf0d706889ba1d46470e27326" +source = "git+https://github.com/oxidecomputer/dropshot?branch=main#21e86a2de595ff83e21328385fa7444ac1401236" dependencies = [ "proc-macro2", "quote", @@ -4612,9 +4612,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1847b767a3d62d95cbf3d8a9f0e421cf57a0d8aa4f411d4b16525afb0284d4ed" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "bytes", "chrono", @@ -4627,9 +4627,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4d7e1b012cb3d9129567661a63755ea4b8a7386d339dc945ae187e403c6743" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", From 5ca61d1fdba54569c049d605d51355991312be46 Mon Sep 17 00:00:00 2001 From: "Adam H. Leventhal" Date: Wed, 5 Oct 2022 09:45:31 -0700 Subject: [PATCH 2/2] fix output --- common/tests/output/pagination-schema.txt | 98 ++++++++--- openapi/nexus-internal.json | 102 +++++++++-- openapi/nexus.json | 197 ++++++++++++++++++---- openapi/sled-agent.json | 126 +++++++++++--- 4 files changed, 430 insertions(+), 93 deletions(-) diff --git a/common/tests/output/pagination-schema.txt b/common/tests/output/pagination-schema.txt index f21aa3aa705..2fdc227cdaa 100644 --- a/common/tests/output/pagination-schema.txt +++ b/common/tests/output/pagination-schema.txt @@ -17,9 +17,14 @@ schema for pagination parameters: scan parameters, scan by name only "definitions": { "NameSortMode": { "description": "Supported set of sort modes for scanning by name only\n\nCurrently, we only support scanning in ascending order.", - "type": "string", - "enum": [ - "name_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"name\"", + "type": "string", + "enum": [ + "name_ascending" + ] + } ] } } @@ -43,9 +48,14 @@ schema for pagination parameters: scan parameters, scan by id only "definitions": { "IdSortMode": { "description": "Supported set of sort modes for scanning by id only.\n\nCurrently, we only support scanning in ascending order.", - "type": "string", - "enum": [ - "id_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"id\"", + "type": "string", + "enum": [ + "id_ascending" + ] + } ] } } @@ -69,11 +79,28 @@ schema for pagination parameters: scan parameters, scan by name or id "definitions": { "NameOrIdSortMode": { "description": "Supported set of sort modes for scanning by name or id", - "type": "string", - "enum": [ - "name_ascending", - "name_descending", - "id_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"name\"", + "type": "string", + "enum": [ + "name_ascending" + ] + }, + { + "description": "sort in decreasing order of \"name\"", + "type": "string", + "enum": [ + "name_descending" + ] + }, + { + "description": "sort in increasing order of \"id\"", + "type": "string", + "enum": [ + "id_ascending" + ] + } ] } } @@ -115,9 +142,14 @@ schema for pagination parameters: page selector, scan by name only }, "NameSortMode": { "description": "Supported set of sort modes for scanning by name only\n\nCurrently, we only support scanning in ascending order.", - "type": "string", - "enum": [ - "name_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"name\"", + "type": "string", + "enum": [ + "name_ascending" + ] + } ] } } @@ -149,9 +181,14 @@ schema for pagination parameters: page selector, scan by id only "definitions": { "IdSortMode": { "description": "Supported set of sort modes for scanning by id only.\n\nCurrently, we only support scanning in ascending order.", - "type": "string", - "enum": [ - "id_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"id\"", + "type": "string", + "enum": [ + "id_ascending" + ] + } ] } } @@ -222,11 +259,28 @@ schema for pagination parameters: page selector, scan by name or id }, "NameOrIdSortMode": { "description": "Supported set of sort modes for scanning by name or id", - "type": "string", - "enum": [ - "name_ascending", - "name_descending", - "id_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"name\"", + "type": "string", + "enum": [ + "name_ascending" + ] + }, + { + "description": "sort in decreasing order of \"name\"", + "type": "string", + "enum": [ + "name_descending" + ] + }, + { + "description": "sort in increasing order of \"id\"", + "type": "string", + "enum": [ + "id_ascending" + ] + } ] } } diff --git a/openapi/nexus-internal.json b/openapi/nexus-internal.json index 8309024eb06..9cfb220e9e8 100644 --- a/openapi/nexus-internal.json +++ b/openapi/nexus-internal.json @@ -1500,18 +1500,77 @@ }, "InstanceState": { "description": "Running state of an Instance (primarily: booted or stopped)\n\nThis typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle", - "type": "string", - "enum": [ - "creating", - "starting", - "running", - "stopping", - "stopped", - "rebooting", - "migrating", - "repairing", - "failed", - "destroyed" + "oneOf": [ + { + "description": "The instance is being created.", + "type": "string", + "enum": [ + "creating" + ] + }, + { + "description": "The instance is currently starting up.", + "type": "string", + "enum": [ + "starting" + ] + }, + { + "description": "The instance is currently running.", + "type": "string", + "enum": [ + "running" + ] + }, + { + "description": "The instance has been requested to stop and a transition to \"Stopped\" is imminent.", + "type": "string", + "enum": [ + "stopping" + ] + }, + { + "description": "The instance is currently stopped.", + "type": "string", + "enum": [ + "stopped" + ] + }, + { + "description": "The instance is in the process of rebooting - it will remain in the \"rebooting\" state until the VM is starting once more.", + "type": "string", + "enum": [ + "rebooting" + ] + }, + { + "description": "The instance is in the process of migrating - it will remain in the \"migrating\" state until the migration process is complete and the destination propolis is ready to continue execution.", + "type": "string", + "enum": [ + "migrating" + ] + }, + { + "description": "The instance is attempting to recover from a failure.", + "type": "string", + "enum": [ + "repairing" + ] + }, + { + "description": "The instance has encountered a failure.", + "type": "string", + "enum": [ + "failed" + ] + }, + { + "description": "The instance has been deleted.", + "type": "string", + "enum": [ + "destroyed" + ] + } ] }, "Measurement": { @@ -1808,10 +1867,21 @@ }, "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.", - "type": "string", - "enum": [ - "gimlet", - "scrimlet" + "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" + ] + } ] }, "ZpoolPutRequest": { diff --git a/openapi/nexus.json b/openapi/nexus.json index b91b2fd282a..3a7fa254ee5 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -8516,9 +8516,14 @@ ] }, "IdentityProviderType": { - "type": "string", - "enum": [ - "saml" + "oneOf": [ + { + "description": "SAML identity provider", + "type": "string", + "enum": [ + "saml" + ] + } ] }, "IdentityType": { @@ -9102,18 +9107,77 @@ }, "InstanceState": { "description": "Running state of an Instance (primarily: booted or stopped)\n\nThis typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle", - "type": "string", - "enum": [ - "creating", - "starting", - "running", - "stopping", - "stopped", - "rebooting", - "migrating", - "repairing", - "failed", - "destroyed" + "oneOf": [ + { + "description": "The instance is being created.", + "type": "string", + "enum": [ + "creating" + ] + }, + { + "description": "The instance is currently starting up.", + "type": "string", + "enum": [ + "starting" + ] + }, + { + "description": "The instance is currently running.", + "type": "string", + "enum": [ + "running" + ] + }, + { + "description": "The instance has been requested to stop and a transition to \"Stopped\" is imminent.", + "type": "string", + "enum": [ + "stopping" + ] + }, + { + "description": "The instance is currently stopped.", + "type": "string", + "enum": [ + "stopped" + ] + }, + { + "description": "The instance is in the process of rebooting - it will remain in the \"rebooting\" state until the VM is starting once more.", + "type": "string", + "enum": [ + "rebooting" + ] + }, + { + "description": "The instance is in the process of migrating - it will remain in the \"migrating\" state until the migration process is complete and the destination propolis is ready to continue execution.", + "type": "string", + "enum": [ + "migrating" + ] + }, + { + "description": "The instance is attempting to recover from a failure.", + "type": "string", + "enum": [ + "repairing" + ] + }, + { + "description": "The instance has encountered a failure.", + "type": "string", + "enum": [ + "failed" + ] + }, + { + "description": "The instance has been deleted.", + "type": "string", + "enum": [ + "destroyed" + ] + } ] }, "IpKind": { @@ -10239,12 +10303,35 @@ }, "RouterRouteKind": { "description": "The classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.\n\nSee [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context", - "type": "string", - "enum": [ - "default", - "vpc_subnet", - "vpc_peering", - "custom" + "oneOf": [ + { + "description": "Determines the default destination of traffic, such as whether it goes to the internet or not.\n\n`Destination: An Internet Gateway` `Modifiable: true`", + "type": "string", + "enum": [ + "default" + ] + }, + { + "description": "Automatically added for each VPC Subnet in the VPC\n\n`Destination: A VPC Subnet` `Modifiable: false`", + "type": "string", + "enum": [ + "vpc_subnet" + ] + }, + { + "description": "Automatically added when VPC peering is established\n\n`Destination: A different VPC` `Modifiable: false`", + "type": "string", + "enum": [ + "vpc_peering" + ] + }, + { + "description": "Created by a user See [`RouteTarget`]\n\n`Destination: User defined` `Modifiable: true`", + "type": "string", + "enum": [ + "custom" + ] + } ] }, "RouterRouteResultsPage": { @@ -10694,10 +10781,21 @@ }, "SiloIdentityMode": { "description": "Describes how identities are managed and users are authenticated in this Silo", - "type": "string", - "enum": [ - "saml_jit", - "local_only" + "oneOf": [ + { + "description": "Users are authenticated with SAML using an external authentication provider. The system updates information about users and groups only during successful authentication (i.e,. \"JIT provisioning\" of users and groups).", + "type": "string", + "enum": [ + "saml_jit" + ] + }, + { + "description": "The system is the source of truth about users. There is no linkage to an external authentication provider or identity provider.", + "type": "string", + "enum": [ + "local_only" + ] + } ] }, "SiloResultsPage": { @@ -12048,18 +12146,40 @@ }, "NameOrIdSortMode": { "description": "Supported set of sort modes for scanning by name or id", - "type": "string", - "enum": [ - "name_ascending", - "name_descending", - "id_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"name\"", + "type": "string", + "enum": [ + "name_ascending" + ] + }, + { + "description": "sort in decreasing order of \"name\"", + "type": "string", + "enum": [ + "name_descending" + ] + }, + { + "description": "sort in increasing order of \"id\"", + "type": "string", + "enum": [ + "id_ascending" + ] + } ] }, "NameSortMode": { "description": "Supported set of sort modes for scanning by name only\n\nCurrently, we only support scanning in ascending order.", - "type": "string", - "enum": [ - "name_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"name\"", + "type": "string", + "enum": [ + "name_ascending" + ] + } ] }, "DiskMetricName": { @@ -12075,9 +12195,14 @@ }, "IdSortMode": { "description": "Supported set of sort modes for scanning by id only.\n\nCurrently, we only support scanning in ascending order.", - "type": "string", - "enum": [ - "id_ascending" + "oneOf": [ + { + "description": "sort in increasing order of \"id\"", + "type": "string", + "enum": [ + "id_ascending" + ] + } ] } } diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json index d39fd033954..e420ce95f00 100644 --- a/openapi/sled-agent.json +++ b/openapi/sled-agent.json @@ -1124,29 +1124,117 @@ }, "InstanceState": { "description": "Running state of an Instance (primarily: booted or stopped)\n\nThis typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle", - "type": "string", - "enum": [ - "creating", - "starting", - "running", - "stopping", - "stopped", - "rebooting", - "migrating", - "repairing", - "failed", - "destroyed" + "oneOf": [ + { + "description": "The instance is being created.", + "type": "string", + "enum": [ + "creating" + ] + }, + { + "description": "The instance is currently starting up.", + "type": "string", + "enum": [ + "starting" + ] + }, + { + "description": "The instance is currently running.", + "type": "string", + "enum": [ + "running" + ] + }, + { + "description": "The instance has been requested to stop and a transition to \"Stopped\" is imminent.", + "type": "string", + "enum": [ + "stopping" + ] + }, + { + "description": "The instance is currently stopped.", + "type": "string", + "enum": [ + "stopped" + ] + }, + { + "description": "The instance is in the process of rebooting - it will remain in the \"rebooting\" state until the VM is starting once more.", + "type": "string", + "enum": [ + "rebooting" + ] + }, + { + "description": "The instance is in the process of migrating - it will remain in the \"migrating\" state until the migration process is complete and the destination propolis is ready to continue execution.", + "type": "string", + "enum": [ + "migrating" + ] + }, + { + "description": "The instance is attempting to recover from a failure.", + "type": "string", + "enum": [ + "repairing" + ] + }, + { + "description": "The instance has encountered a failure.", + "type": "string", + "enum": [ + "failed" + ] + }, + { + "description": "The instance has been deleted.", + "type": "string", + "enum": [ + "destroyed" + ] + } ] }, "InstanceStateRequested": { "description": "Requestable running state of an Instance.\n\nA subset of [`external::InstanceState`].", - "type": "string", - "enum": [ - "running", - "stopped", - "reboot", - "migrating", - "destroyed" + "oneOf": [ + { + "description": "Start the instance if it is not already running.", + "type": "string", + "enum": [ + "running" + ] + }, + { + "description": "Stop the instance.", + "type": "string", + "enum": [ + "stopped" + ] + }, + { + "description": "Issue a reset command to the instance, such that it should stop and then immediately become running.", + "type": "string", + "enum": [ + "reboot" + ] + }, + { + "description": "Migrate the instance to another node.", + "type": "string", + "enum": [ + "migrating" + ] + }, + { + "description": "Stop the instance and delete it.", + "type": "string", + "enum": [ + "destroyed" + ] + } ] }, "IpNet": {