From 48ab3bc13cf19f4136e9c72f37f21ee8d6b20e3b Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 27 Oct 2025 09:57:44 -0700 Subject: [PATCH 1/9] external volumes attachment --- .../external-volumes/ExternalVolume.yml | 2 +- .../ExternalVolumeAttachment.yml | 22 ---------------- .../attachment/ExternalVolumeAttachment.yml | 14 +++++++++++ .../ExternalVolumeAttachmentInstance.yml | 25 +++++++++++++++++++ .../ExternalVolumeAttachmentRegion.yml | 18 +++++++++++++ .../ExternalVolumeAttachmentServer.yml | 16 ++++++++++++ .../tasks/ExternalVolumeAttachAction.yml | 7 +----- 7 files changed, 75 insertions(+), 29 deletions(-) delete mode 100644 components/schemas/infrastructure/external-volumes/ExternalVolumeAttachment.yml create mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml create mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml create mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml create mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml diff --git a/components/schemas/infrastructure/external-volumes/ExternalVolume.yml b/components/schemas/infrastructure/external-volumes/ExternalVolume.yml index b86b91d6..d8894298 100644 --- a/components/schemas/infrastructure/external-volumes/ExternalVolume.yml +++ b/components/schemas/infrastructure/external-volumes/ExternalVolume.yml @@ -38,7 +38,7 @@ properties: attachment: description: Information about the resource the external volume is currently attached to. anyOf: - - $ref: "./ExternalVolumeAttachment.yml" + - $ref: "./attachment/ExternalVolumeAttachment.yml" - type: "null" size: description: > diff --git a/components/schemas/infrastructure/external-volumes/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/ExternalVolumeAttachment.yml deleted file mode 100644 index 5a1a7cb0..00000000 --- a/components/schemas/infrastructure/external-volumes/ExternalVolumeAttachment.yml +++ /dev/null @@ -1,22 +0,0 @@ -title: ExternalVolumeAttachment -type: object -description: > - Represents where the volume is currently attached. -required: - - mode - - server_id - - container_id - - instance_id -properties: - mode: - type: string - description: The mode of attachment. `instance` means attached to a single container instance, while `host` makes it available across multiple containers on the same host. - enum: - - instance - - host - server_id: - $ref: "../../ID.yml" - container_id: - $ref: "../../ID.yml" - instance_id: - $ref: "../../ID.yml" diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml new file mode 100644 index 00000000..62eadc39 --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml @@ -0,0 +1,14 @@ +# ExternalVolumeAttachment.yml +title: ExternalVolumeAttachment +type: object +description: Attachment configuration for an external volume. +discriminator: + propertyName: mode + mapping: + instance: ExternalVolumeAttachmentInstance.yml + server: ExternalVolumeAttachmentServer.yml + region: ExternalVolumeAttachmentRegion.yml +oneOf: + - $ref: ExternalVolumeAttachmentInstance.yml + - $ref: ExternalVolumeAttachmentServer.yml + - $ref: ExternalVolumeAttachmentRegion.yml diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml new file mode 100644 index 00000000..776f27f5 --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml @@ -0,0 +1,25 @@ +# ExternalVolumeAttachmentInstance.yml +title: ExternalVolumeAttachmentInstance +type: object +required: + - mode + - details +properties: + mode: + type: string + enum: [instance] + details: + type: object + required: + - server_id + properties: + server_id: + $ref: ../../../ID.yml + container_id: + oneOf: + - $ref: ../../../ID.yml + - type: "null" + instance_id: + oneOf: + - $ref: ../../../ID.yml + - type: "null" diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml new file mode 100644 index 00000000..30e532a4 --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml @@ -0,0 +1,18 @@ +title: ExternalVolumeAttachmentRegion +type: object +required: + - mode + - details +properties: + mode: + type: string + enum: [region] + details: + type: object + required: + - server_ids + properties: + server_ids: + type: array + items: + $ref: ../../../ID.yml diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml new file mode 100644 index 00000000..3647b24e --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml @@ -0,0 +1,16 @@ +title: ExternalVolumeAttachmentServer +type: object +required: + - mode + - details +properties: + mode: + type: string + enum: [server] + details: + type: object + required: + - server_id + properties: + server_id: + $ref: ../../../ID.yml diff --git a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeAttachAction.yml b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeAttachAction.yml index 77836e2f..b84ad001 100644 --- a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeAttachAction.yml +++ b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeAttachAction.yml @@ -11,9 +11,4 @@ properties: - attach description: The name of the action to perform (attach). contents: - type: object - required: - - instance_id - properties: - instance_id: - $ref: ../../../ID.yml + $ref: ../attachment/ExternalVolumeAttachment.yml From 07ee4c376e57df20090f5bd7efafb92dc7ed63e6 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 28 Oct 2025 08:45:29 -0700 Subject: [PATCH 2/9] latest from jake --- .../containers/config/ContainerVolume.yml | 6 --- .../attachment/ExternalVolumeAttachment.yml | 44 ++++++++++++++----- .../ExternalVolumeAttachmentBlock.yml | 6 +++ .../ExternalVolumeAttachmentFileSystem.yml | 6 +++ .../ExternalVolumeAttachmentInstance.yml | 25 ----------- .../ExternalVolumeAttachmentRegion.yml | 18 -------- .../ExternalVolumeAttachmentServer.yml | 16 ------- 7 files changed, 45 insertions(+), 76 deletions(-) create mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml create mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml delete mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml delete mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml delete mode 100644 components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml diff --git a/components/schemas/containers/config/ContainerVolume.yml b/components/schemas/containers/config/ContainerVolume.yml index 5683b5ac..64b81d2f 100644 --- a/components/schemas/containers/config/ContainerVolume.yml +++ b/components/schemas/containers/config/ContainerVolume.yml @@ -36,18 +36,12 @@ properties: external: anyOf: - type: object - required: - - mode properties: identifier: oneOf: - $ref: ../../Identifier.yml - type: "null" description: The identifier of the external volume. - mode: - type: string - description: The attachment mode for the external volume - enum: [instance, host] - type: "null" destination: type: string diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml index 62eadc39..32ec51d0 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml @@ -1,14 +1,36 @@ -# ExternalVolumeAttachment.yml title: ExternalVolumeAttachment type: object description: Attachment configuration for an external volume. -discriminator: - propertyName: mode - mapping: - instance: ExternalVolumeAttachmentInstance.yml - server: ExternalVolumeAttachmentServer.yml - region: ExternalVolumeAttachmentRegion.yml -oneOf: - - $ref: ExternalVolumeAttachmentInstance.yml - - $ref: ExternalVolumeAttachmentServer.yml - - $ref: ExternalVolumeAttachmentRegion.yml +required: [mode, type, details] +properties: + mode: + type: string + description: > + The access mode for the attachment. + + - `single-instance-writer`: one instance may write. + - `single-instance-read-only`: one instance may read only. + - `single-node-writer`: multiple containers on a single node may write. + - `single-node-read-only`: multiple containers on a single node may read only. + - `multi-node-writer`: multiple nodes may write. + - `multi-node-read-only`: multiple nodes may read only. + enum: + - single-instance-writer + - single-instance-read-only + - single-node-writer + - single-node-read-only + - multi-node-writer + - multi-node-read-only +allOf: + - oneOf: + - properties: + type: + const: block + details: + $ref: ./ExternalVolumeAttachmentBlock.yml + - properties: + type: + const: filesystem + details: + $ref: ./ExternalVolumeAttachmentFileSystem.yml + - diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml new file mode 100644 index 00000000..435d770b --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml @@ -0,0 +1,6 @@ +title: ExternalVolumeAttachmentBlock +type: object +description: Details for a block attachment. Present when `type` is `block`. +# No fields today, reserved for future expansion +properties: {} +additionalProperties: false diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml new file mode 100644 index 00000000..583b496c --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml @@ -0,0 +1,6 @@ +title: ExternalVolumeAttachmentFileSystem +type: object +description: Details for a filesystem attachment. Present when `type` is `filesystem`. +# No fields today, reserved for future expansion +properties: {} +additionalProperties: false diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml deleted file mode 100644 index 776f27f5..00000000 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentInstance.yml +++ /dev/null @@ -1,25 +0,0 @@ -# ExternalVolumeAttachmentInstance.yml -title: ExternalVolumeAttachmentInstance -type: object -required: - - mode - - details -properties: - mode: - type: string - enum: [instance] - details: - type: object - required: - - server_id - properties: - server_id: - $ref: ../../../ID.yml - container_id: - oneOf: - - $ref: ../../../ID.yml - - type: "null" - instance_id: - oneOf: - - $ref: ../../../ID.yml - - type: "null" diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml deleted file mode 100644 index 30e532a4..00000000 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentRegion.yml +++ /dev/null @@ -1,18 +0,0 @@ -title: ExternalVolumeAttachmentRegion -type: object -required: - - mode - - details -properties: - mode: - type: string - enum: [region] - details: - type: object - required: - - server_ids - properties: - server_ids: - type: array - items: - $ref: ../../../ID.yml diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml deleted file mode 100644 index 3647b24e..00000000 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentServer.yml +++ /dev/null @@ -1,16 +0,0 @@ -title: ExternalVolumeAttachmentServer -type: object -required: - - mode - - details -properties: - mode: - type: string - enum: [server] - details: - type: object - required: - - server_id - properties: - server_id: - $ref: ../../../ID.yml From a55231ad3afcaee5cbd89beb72b3b3bd0d33a5d0 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 29 Oct 2025 07:02:42 -0700 Subject: [PATCH 3/9] id in container config for external volume --- components/schemas/containers/config/ContainerVolume.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/schemas/containers/config/ContainerVolume.yml b/components/schemas/containers/config/ContainerVolume.yml index 64b81d2f..3a9c8d71 100644 --- a/components/schemas/containers/config/ContainerVolume.yml +++ b/components/schemas/containers/config/ContainerVolume.yml @@ -42,6 +42,11 @@ properties: - $ref: ../../Identifier.yml - type: "null" description: The identifier of the external volume. + id: + oneOf: + - $ref: ../../Id.yml + - type: "null" + description: The id of the external volume. - type: "null" destination: type: string From b85a0f568124c750be21786e5f336de75d6758cb Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 29 Oct 2025 07:29:29 -0700 Subject: [PATCH 4/9] tweak --- .../external-volumes/ExternalVolume.yml | 6 +-- .../attachment/ExternalVolumeAttachment.yml | 42 +++++++++---------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/components/schemas/infrastructure/external-volumes/ExternalVolume.yml b/components/schemas/infrastructure/external-volumes/ExternalVolume.yml index d8894298..fc198393 100644 --- a/components/schemas/infrastructure/external-volumes/ExternalVolume.yml +++ b/components/schemas/infrastructure/external-volumes/ExternalVolume.yml @@ -28,7 +28,7 @@ properties: cluster: $ref: "../../Identifier.yml" identifier: - anyOf: + oneOf: - $ref: "../../Identifier.yml" - type: "null" location_id: @@ -37,14 +37,14 @@ properties: $ref: "./sources/ExternalVolumeSource.yml" attachment: description: Information about the resource the external volume is currently attached to. - anyOf: + oneOf: - $ref: "./attachment/ExternalVolumeAttachment.yml" - type: "null" size: description: > Size of the external volume; may be null or omitted if the size has not yet been determined. - anyOf: + oneOf: - $ref: "../../DataSize.yml" - type: "null" options: diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml index 32ec51d0..a084bb91 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml @@ -5,15 +5,7 @@ required: [mode, type, details] properties: mode: type: string - description: > - The access mode for the attachment. - - - `single-instance-writer`: one instance may write. - - `single-instance-read-only`: one instance may read only. - - `single-node-writer`: multiple containers on a single node may write. - - `single-node-read-only`: multiple containers on a single node may read only. - - `multi-node-writer`: multiple nodes may write. - - `multi-node-read-only`: multiple nodes may read only. + description: The access mode for the attachment. enum: - single-instance-writer - single-instance-read-only @@ -21,16 +13,22 @@ properties: - single-node-read-only - multi-node-writer - multi-node-read-only -allOf: - - oneOf: - - properties: - type: - const: block - details: - $ref: ./ExternalVolumeAttachmentBlock.yml - - properties: - type: - const: filesystem - details: - $ref: ./ExternalVolumeAttachmentFileSystem.yml - - + +oneOf: + - type: object + required: [type, details] + properties: + type: + type: string + enum: [block] + details: + $ref: ./ExternalVolumeAttachmentBlock.yml + + - type: object + required: [type, details] + properties: + type: + type: string + enum: [filesystem] + details: + $ref: ./ExternalVolumeAttachmentFilesystem.yml From 391491241cbb58a7c3acd1de0785cf64744ecef9 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 29 Oct 2025 07:30:05 -0700 Subject: [PATCH 5/9] spacing --- .../external-volumes/attachment/ExternalVolumeAttachment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml index a084bb91..b48c4bd5 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml @@ -13,7 +13,6 @@ properties: - single-node-read-only - multi-node-writer - multi-node-read-only - oneOf: - type: object required: [type, details] From 5887fa3149d6ffc58e67d3a456922b57aaf0db5e Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 29 Oct 2025 07:33:37 -0700 Subject: [PATCH 6/9] capitalization --- components/schemas/containers/config/ContainerVolume.yml | 2 +- .../external-volumes/attachment/ExternalVolumeAttachment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/schemas/containers/config/ContainerVolume.yml b/components/schemas/containers/config/ContainerVolume.yml index 3a9c8d71..407daec3 100644 --- a/components/schemas/containers/config/ContainerVolume.yml +++ b/components/schemas/containers/config/ContainerVolume.yml @@ -44,7 +44,7 @@ properties: description: The identifier of the external volume. id: oneOf: - - $ref: ../../Id.yml + - $ref: ../../ID.yml - type: "null" description: The id of the external volume. - type: "null" diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml index b48c4bd5..104b5d34 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml @@ -30,4 +30,4 @@ oneOf: type: string enum: [filesystem] details: - $ref: ./ExternalVolumeAttachmentFilesystem.yml + $ref: ./ExternalVolumeAttachmentFileSystem.yml From f55601bf8c34fdd7373b4f67691d6e1f681e4822 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 29 Oct 2025 08:09:25 -0700 Subject: [PATCH 7/9] discriminate union --- .../attachment/ExternalVolumeAttachment.yml | 36 ++++--------------- .../ExternalVolumeAttachmentBlock.yml | 26 +++++++++++--- .../ExternalVolumeAttachmentFileSystem.yml | 26 +++++++++++--- 3 files changed, 51 insertions(+), 37 deletions(-) diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml index 104b5d34..d0835430 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml @@ -1,33 +1,11 @@ title: ExternalVolumeAttachment type: object description: Attachment configuration for an external volume. -required: [mode, type, details] -properties: - mode: - type: string - description: The access mode for the attachment. - enum: - - single-instance-writer - - single-instance-read-only - - single-node-writer - - single-node-read-only - - multi-node-writer - - multi-node-read-only +discriminator: + propertyName: type + mapping: + block: ./ExternalVolumeAttachmentBlock.yml + filesystem: ./ExternalVolumeAttachmentFilesystem.yml oneOf: - - type: object - required: [type, details] - properties: - type: - type: string - enum: [block] - details: - $ref: ./ExternalVolumeAttachmentBlock.yml - - - type: object - required: [type, details] - properties: - type: - type: string - enum: [filesystem] - details: - $ref: ./ExternalVolumeAttachmentFileSystem.yml + - $ref: ./ExternalVolumeAttachmentBlock.yml + - $ref: ./ExternalVolumeAttachmentFilesystem.yml diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml index 435d770b..1c940380 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentBlock.yml @@ -1,6 +1,24 @@ title: ExternalVolumeAttachmentBlock type: object -description: Details for a block attachment. Present when `type` is `block`. -# No fields today, reserved for future expansion -properties: {} -additionalProperties: false +description: Configuration for a block volume attachment. +required: [type, mode, details] +properties: + type: + type: string + enum: [block] + mode: + type: string + description: The access mode for the attachment. + enum: + - single-instance-writer + - single-instance-read-only + - single-node-writer + - single-node-read-only + - multi-node-writer + - multi-node-read-only + details: + type: object + description: Details for a block attachment. Present when `type` is `block`. + # No fields today, reserved for future expansion + properties: {} + additionalProperties: false diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml index 583b496c..72414a38 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachmentFileSystem.yml @@ -1,6 +1,24 @@ title: ExternalVolumeAttachmentFileSystem type: object -description: Details for a filesystem attachment. Present when `type` is `filesystem`. -# No fields today, reserved for future expansion -properties: {} -additionalProperties: false +description: Configuration for a filesystem volume attachment. +required: [type, mode, details] +properties: + type: + type: string + enum: [filesystem] + mode: + type: string + description: The access mode for the attachment. + enum: + - single-instance-writer + - single-instance-read-only + - single-node-writer + - single-node-read-only + - multi-node-writer + - multi-node-read-only + details: + type: object + description: Details for a filesystem attachment. Present when `type` is `filesystem`. + # No fields today, reserved for future expansion + properties: {} + additionalProperties: false From 6e1301e3d4c1e44a410cd1fa7a4a35503da060e7 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 29 Oct 2025 08:16:29 -0700 Subject: [PATCH 8/9] save --- .../external-volumes/attachment/ExternalVolumeAttachment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml index d0835430..009c8402 100644 --- a/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml +++ b/components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml @@ -5,7 +5,7 @@ discriminator: propertyName: type mapping: block: ./ExternalVolumeAttachmentBlock.yml - filesystem: ./ExternalVolumeAttachmentFilesystem.yml + filesystem: ./ExternalVolumeAttachmentFileSystem.yml oneOf: - $ref: ./ExternalVolumeAttachmentBlock.yml - - $ref: ./ExternalVolumeAttachmentFilesystem.yml + - $ref: ./ExternalVolumeAttachmentFileSystem.yml From 0dd7164d18e92ec267566625eba03cbc5ee523ad Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 29 Oct 2025 09:40:40 -0700 Subject: [PATCH 9/9] remove sanlun endpoints --- .../external-volumes/ExternalVolume.yml | 9 +- platform/api.yml | 8 -- .../external-volumes/external-volumes.yml | 9 ++ .../san/includes/SanLunIncludes.yml | 8 -- .../paths/infrastructure/san/luns/luns.yml | 85 ------------------- .../infrastructure/san/targets/targets.yml | 56 ------------ platform/paths/infrastructure/san/tasks.yml | 26 ------ .../infrastructure/san/tasks/SanSyncTask.yml | 29 ------- .../infrastructure/san/tasks/SanTask.yml | 7 -- 9 files changed, 15 insertions(+), 222 deletions(-) delete mode 100644 platform/paths/infrastructure/san/includes/SanLunIncludes.yml delete mode 100644 platform/paths/infrastructure/san/luns/luns.yml delete mode 100644 platform/paths/infrastructure/san/targets/targets.yml delete mode 100644 platform/paths/infrastructure/san/tasks.yml delete mode 100644 platform/paths/infrastructure/san/tasks/SanSyncTask.yml delete mode 100644 platform/paths/infrastructure/san/tasks/SanTask.yml diff --git a/components/schemas/infrastructure/external-volumes/ExternalVolume.yml b/components/schemas/infrastructure/external-volumes/ExternalVolume.yml index fc198393..0d4310da 100644 --- a/components/schemas/infrastructure/external-volumes/ExternalVolume.yml +++ b/components/schemas/infrastructure/external-volumes/ExternalVolume.yml @@ -11,6 +11,7 @@ required: - about - cluster - location_id + - server_ids - source - options - state @@ -33,13 +34,15 @@ properties: - type: "null" location_id: $ref: "../../ID.yml" + server_ids: + type: array + items: + $ref: "../../ID.yml" source: $ref: "./sources/ExternalVolumeSource.yml" attachment: description: Information about the resource the external volume is currently attached to. - oneOf: - - $ref: "./attachment/ExternalVolumeAttachment.yml" - - type: "null" + $ref: "./attachment/ExternalVolumeAttachment.yml" size: description: > Size of the external volume; may be null or omitted if the size has not yet diff --git a/platform/api.yml b/platform/api.yml index 6114ea4c..23acaa6a 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -649,14 +649,6 @@ paths: "/v1/infrastructure/servers/{serverId}/console": $ref: "./paths/infrastructure/servers/console.yml" - ## SANs - "/v1/infrastructure/san/targets": - $ref: "./paths/infrastructure/san/targets/targets.yml" - "/v1/infrastructure/san/luns": - $ref: "./paths/infrastructure/san/luns/luns.yml" - "/v1/infrastructure/san/tasks": - $ref: "./paths/infrastructure/san/tasks.yml" - ## IPs "/v1/infrastructure/ips/pools": $ref: "./paths/infrastructure/ips/pools.yml" diff --git a/platform/paths/infrastructure/external-volumes/external-volumes.yml b/platform/paths/infrastructure/external-volumes/external-volumes.yml index 4bd40dfe..4d00aaa7 100644 --- a/platform/paths/infrastructure/external-volumes/external-volumes.yml +++ b/platform/paths/infrastructure/external-volumes/external-volumes.yml @@ -87,6 +87,8 @@ post: - name - cluster - location_id + - server_ids + - attachment - source - options properties: @@ -106,8 +108,15 @@ post: description: The cluster this external volume is associated with. location_id: $ref: ../../../../components/schemas/ID.yml + server_ids: + type: array + items: + $ref: ../../../../components/schemas/ID.yml source: $ref: ../../../../components/schemas/infrastructure/external-volumes/sources/ExternalVolumeSource.yml + attachment: + description: Information about the resource the external volume is currently attached to. + $ref: "../../../../components/schemas/infrastructure/external-volumes/attachment/ExternalVolumeAttachment.yml" options: $ref: ../../../../components/schemas/infrastructure/external-volumes/ExternalVolumeOptions.yml about: diff --git a/platform/paths/infrastructure/san/includes/SanLunIncludes.yml b/platform/paths/infrastructure/san/includes/SanLunIncludes.yml deleted file mode 100644 index 31258f47..00000000 --- a/platform/paths/infrastructure/san/includes/SanLunIncludes.yml +++ /dev/null @@ -1,8 +0,0 @@ -title: SanLunIncludes -description: All includable resources linkable to the given LUN. -type: object -properties: - targets: - type: object - additionalProperties: - $ref: ../../../../../components/schemas/infrastructure/san/targets/SanTarget.yml diff --git a/platform/paths/infrastructure/san/luns/luns.yml b/platform/paths/infrastructure/san/luns/luns.yml deleted file mode 100644 index c439bc59..00000000 --- a/platform/paths/infrastructure/san/luns/luns.yml +++ /dev/null @@ -1,85 +0,0 @@ -get: - operationId: "getSanLuns" - summary: Get SAN LUNs - description: Lists any SAN LUNs available for the hub. - security: - - bearerAuth: [] - tags: - - SANs - parameters: - - $ref: "../../../../../components/parameters/SortParam.yml" - - $ref: "../../../../../components/parameters/PageParam.yml" - - name: filter - in: query - required: - false - # Deep nested arrays are undefined https://github.com/OAI/OpenAPI-Specification/issues/1706 - style: deepObject - description: | - ## Filter Field - The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for. - schema: - type: object - properties: - server: - description: Get only those SAN LUNs within the specified server. - type: string - location: - description: Get only those SAN LUNs within the specified location. - type: string - cluster: - description: Get only those SAN LUNs within the specified cluster. - type: string - state: - description: Get only those SAN LUNs with the specified state. - type: string - enum: - - new - - live - - deleting - - deleted - - name: meta - in: query - required: false - description: - A comma separated list of meta values. Meta values will show up under a resource's - `meta` field. In the case of applying a meta to a collection of resources, each - resource will have it's own relevant meta data. In some rare cases, meta may not - apply to individual resources, and may appear in the root document. These will be - clearly labeled. - schema: - type: array - items: - type: string - enum: - - container - - name: include - in: query - required: false - description: | - A comma-separated list of include values. Included resources will show up under the root document's `include` field. - In the case of applying an include to a collection of resources, if multiple resources share the same include, it will only appear once in the return. - schema: - type: array - items: - type: string - enum: - - targets - responses: - 200: - description: Returns a list of SAN LUNs. - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: ../../../../../components/schemas/infrastructure/san/luns/SanLun.yml - includes: - $ref: ../includes/SanLunIncludes.yml - default: - $ref: ../../../../../components/responses/errors/DefaultError.yml diff --git a/platform/paths/infrastructure/san/targets/targets.yml b/platform/paths/infrastructure/san/targets/targets.yml deleted file mode 100644 index f74c4efa..00000000 --- a/platform/paths/infrastructure/san/targets/targets.yml +++ /dev/null @@ -1,56 +0,0 @@ -get: - operationId: "getSanTargets" - summary: Get SAN Targets - description: Lists any SAN targets available for the hub. - security: - - bearerAuth: [] - tags: - - SANs - parameters: - - $ref: "../../../../../components/parameters/SortParam.yml" - - $ref: "../../../../../components/parameters/PageParam.yml" - - name: filter - in: query - required: - false - # Deep nested arrays are undefined https://github.com/OAI/OpenAPI-Specification/issues/1706 - style: deepObject - description: | - ## Filter Field - The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for. - schema: - type: object - properties: - server: - description: Get only those SAN targets within the specified server. - type: string - location: - description: Get only those SAN targets within the specified location. - type: string - cluster: - description: Get only those SAN targets within the specified cluster. - type: string - state: - description: Get only those SAN targets with the specified state. - type: string - enum: - - new - - live - - deleting - - deleted - responses: - 200: - description: Returns a list of SAN targets. - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - type: array - items: - $ref: ../../../../../components/schemas/infrastructure/san/targets/SanTarget.yml - default: - $ref: ../../../../../components/responses/errors/DefaultError.yml diff --git a/platform/paths/infrastructure/san/tasks.yml b/platform/paths/infrastructure/san/tasks.yml deleted file mode 100644 index 2de8dcbd..00000000 --- a/platform/paths/infrastructure/san/tasks.yml +++ /dev/null @@ -1,26 +0,0 @@ -post: - operationId: "createSanJob" - summary: Create SAN Job - description: Used to perform different actions related to SANs. Requires the `san-manage` capability. - tags: - - SANs - requestBody: - description: Parameters for creating the new SAN Job. - content: - application/json: - schema: - $ref: ./tasks/SanTask.yml - responses: - 202: - description: Returns a job descriptor. - content: - application/json: - schema: - type: object - required: - - data - properties: - data: - $ref: ../../../../components/schemas/jobs/JobDescriptor.yml - default: - $ref: ../../../../components/responses/errors/DefaultError.yml diff --git a/platform/paths/infrastructure/san/tasks/SanSyncTask.yml b/platform/paths/infrastructure/san/tasks/SanSyncTask.yml deleted file mode 100644 index ffe1550a..00000000 --- a/platform/paths/infrastructure/san/tasks/SanSyncTask.yml +++ /dev/null @@ -1,29 +0,0 @@ -title: SanSyncTask -type: object -required: - - action -properties: - action: - type: string - enum: - - sync - contents: - type: object - properties: - server_id: - $ref: ../../../../../components/schemas/ID.yml - description: The ID of the server to initiate a SAN sync on. - discovery_ip: - description: IP to run discovery on. - oneOf: - - type: string - format: ipv4 - - type: string - format: ipv6 - credentials: - anyOf: - - $ref: ../../../../../components/schemas/infrastructure/san/targets/SanTargetChapCredentials.yml - - type: "null" - required: - - server_id - - discovery_ip diff --git a/platform/paths/infrastructure/san/tasks/SanTask.yml b/platform/paths/infrastructure/san/tasks/SanTask.yml deleted file mode 100644 index 45df07aa..00000000 --- a/platform/paths/infrastructure/san/tasks/SanTask.yml +++ /dev/null @@ -1,7 +0,0 @@ -title: SanTask -discriminator: - propertyName: action - mapping: - sync: SanSyncTask.yml -oneOf: - - $ref: SanSyncTask.yml