diff --git a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeAttachAction.yml b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeAttachAction.yml deleted file mode 100644 index b84ad001..00000000 --- a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeAttachAction.yml +++ /dev/null @@ -1,14 +0,0 @@ -title: ExternalVolumeAttachAction -description: A task to attach an external volume. -type: object -required: - - action - - contents -properties: - action: - type: string - enum: - - attach - description: The name of the action to perform (attach). - contents: - $ref: ../attachment/ExternalVolumeAttachment.yml diff --git a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeDetachAction.yml b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeDetachAction.yml deleted file mode 100644 index 1c202b0c..00000000 --- a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeDetachAction.yml +++ /dev/null @@ -1,11 +0,0 @@ -title: ExternalVolumeDetachAction -description: A task to detach an external volume from an instance. -type: object -required: - - action -properties: - action: - type: string - enum: - - detach - description: The name of the action to perform (detach). diff --git a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeServersReconfigureAction.yml b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeServersReconfigureAction.yml new file mode 100644 index 00000000..6c3ee435 --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeServersReconfigureAction.yml @@ -0,0 +1,16 @@ +title: ExternalVolumeServersReconfigureAction +description: A task to reconfigure mountable destination servers for external volume. +type: object +required: + - action +properties: + action: + type: string + enum: + - servers.reconfigure + description: The name of the action to perform (servers.reconfigure). + contents: + description: Contents contains an array of server ids to set as mountable destinations for the external volume. + type: array + items: + $ref: ../../../ID.yml diff --git a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTask.yml b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTask.yml new file mode 100644 index 00000000..a14343d7 --- /dev/null +++ b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTask.yml @@ -0,0 +1,7 @@ +title: ExternalVolumeTask +discriminator: + propertyName: action + mapping: + servers.reconfigure: ExternalVolumeServersReconfigureAction.yml +oneOf: + - $ref: ExternalVolumeServersReconfigureAction.yml diff --git a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTasks.yml b/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTasks.yml deleted file mode 100644 index bbec48e3..00000000 --- a/components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTasks.yml +++ /dev/null @@ -1,9 +0,0 @@ -title: ExternalVolumeTask -discriminator: - propertyName: action - mapping: - attach: ExternalVolumeAttachAction.yml - detach: ExternalVolumeDetachAction.yml -oneOf: - - $ref: ExternalVolumeAttachAction.yml - - $ref: ExternalVolumeDetachAction.yml diff --git a/platform/paths/infrastructure/external-volumes/tasks.yml b/platform/paths/infrastructure/external-volumes/tasks.yml index 6f1fa0c4..f4557c56 100644 --- a/platform/paths/infrastructure/external-volumes/tasks.yml +++ b/platform/paths/infrastructure/external-volumes/tasks.yml @@ -19,7 +19,7 @@ post: content: application/json: schema: - $ref: ../../../../components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTasks.yml + $ref: ../../../../components/schemas/infrastructure/external-volumes/tasks/ExternalVolumeTask.yml responses: 202: description: Returns a job descriptor.