Skip to content

Commit ef00d62

Browse files
authored
Make doc comments on InstanceUpdate body match InstanceCreate (#9055)
Followup to #9046
1 parent f0144d8 commit ef00d62

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

nexus/types/src/external_api/params.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,18 +1293,27 @@ pub struct InstanceCreate {
12931293
/// Parameters of an `Instance` that can be reconfigured after creation.
12941294
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)]
12951295
pub struct InstanceUpdate {
1296-
/// The number of CPUs to assign to this instance.
1296+
/// The number of vCPUs to be allocated to the instance
12971297
pub ncpus: InstanceCpuCount,
12981298

1299-
/// The amount of memory to assign to this instance.
1299+
/// The amount of RAM (in bytes) to be allocated to the instance
13001300
pub memory: ByteCount,
13011301

1302-
/// Name or ID of the disk the instance should be instructed to boot from.
1302+
/// The disk the instance is configured to boot from.
1303+
///
1304+
/// Setting a boot disk is optional but recommended to ensure predictable
1305+
/// boot behavior. The boot disk can be set during instance creation or
1306+
/// later if the instance is stopped. The boot disk counts against the disk
1307+
/// attachment limit.
13031308
///
1304-
/// A null value unsets the boot disk.
1309+
/// An instance that does not have a boot disk set will use the boot
1310+
/// options specified in its UEFI settings, which are controlled by both the
1311+
/// instance's UEFI firmware and the guest operating system. Boot options
1312+
/// can change as disks are attached and detached, which may result in an
1313+
/// instance that only boots to the EFI shell until a boot disk is set.
13051314
pub boot_disk: Nullable<NameOrId>,
13061315

1307-
/// Sets the auto-restart policy for this instance.
1316+
/// The auto-restart policy for this instance.
13081317
///
13091318
/// This policy determines whether the instance should be automatically
13101319
/// restarted by the control plane on failure. If this is `null`, any
@@ -1321,7 +1330,9 @@ pub struct InstanceUpdate {
13211330
pub auto_restart_policy: Nullable<InstanceAutoRestartPolicy>,
13221331

13231332
/// The CPU platform to be used for this instance. If this is `null`, the
1324-
/// instance requires no particular CPU platform.
1333+
/// instance requires no particular CPU platform; when it is started the
1334+
/// instance will have the most general CPU platform supported by the sled
1335+
/// it is initially placed on.
13251336
pub cpu_platform: Nullable<InstanceCpuPlatform>,
13261337
}
13271338

openapi/nexus.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20833,7 +20833,7 @@
2083320833
"properties": {
2083420834
"auto_restart_policy": {
2083520835
"nullable": true,
20836-
"description": "Sets the auto-restart policy for this instance.\n\nThis policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, any explicitly configured auto-restart policy will be unset, and the control plane will select the default policy when determining whether the instance can be automatically restarted.\n\nCurrently, the global default auto-restart policy is \"best-effort\", so instances with `null` auto-restart policies will be automatically restarted. However, in the future, the default policy may be configurable through other mechanisms, such as on a per-project basis. In that case, any configured default policy will be used if this is `null`.",
20836+
"description": "The auto-restart policy for this instance.\n\nThis policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, any explicitly configured auto-restart policy will be unset, and the control plane will select the default policy when determining whether the instance can be automatically restarted.\n\nCurrently, the global default auto-restart policy is \"best-effort\", so instances with `null` auto-restart policies will be automatically restarted. However, in the future, the default policy may be configurable through other mechanisms, such as on a per-project basis. In that case, any configured default policy will be used if this is `null`.",
2083720837
"allOf": [
2083820838
{
2083920839
"$ref": "#/components/schemas/InstanceAutoRestartPolicy"
@@ -20842,7 +20842,7 @@
2084220842
},
2084320843
"boot_disk": {
2084420844
"nullable": true,
20845-
"description": "Name or ID of the disk the instance should be instructed to boot from.\n\nA null value unsets the boot disk.",
20845+
"description": "The disk the instance is configured to boot from.\n\nSetting a boot disk is optional but recommended to ensure predictable boot behavior. The boot disk can be set during instance creation or later if the instance is stopped. The boot disk counts against the disk attachment limit.\n\nAn instance that does not have a boot disk set will use the boot options specified in its UEFI settings, which are controlled by both the instance's UEFI firmware and the guest operating system. Boot options can change as disks are attached and detached, which may result in an instance that only boots to the EFI shell until a boot disk is set.",
2084620846
"allOf": [
2084720847
{
2084820848
"$ref": "#/components/schemas/NameOrId"
@@ -20851,23 +20851,23 @@
2085120851
},
2085220852
"cpu_platform": {
2085320853
"nullable": true,
20854-
"description": "The CPU platform to be used for this instance. If this is `null`, the instance requires no particular CPU platform.",
20854+
"description": "The CPU platform to be used for this instance. If this is `null`, the instance requires no particular CPU platform; when it is started the instance will have the most general CPU platform supported by the sled it is initially placed on.",
2085520855
"allOf": [
2085620856
{
2085720857
"$ref": "#/components/schemas/InstanceCpuPlatform"
2085820858
}
2085920859
]
2086020860
},
2086120861
"memory": {
20862-
"description": "The amount of memory to assign to this instance.",
20862+
"description": "The amount of RAM (in bytes) to be allocated to the instance",
2086320863
"allOf": [
2086420864
{
2086520865
"$ref": "#/components/schemas/ByteCount"
2086620866
}
2086720867
]
2086820868
},
2086920869
"ncpus": {
20870-
"description": "The number of CPUs to assign to this instance.",
20870+
"description": "The number of vCPUs to be allocated to the instance",
2087120871
"allOf": [
2087220872
{
2087320873
"$ref": "#/components/schemas/InstanceCpuCount"

0 commit comments

Comments
 (0)