Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title: ExternalVolumesScanAction
description: A task to scan for available external volumes on a given cluster.
type: object
required:
- action
properties:
action:
type: string
description: The action for the external volumes job.
enum:
- scan
contents:
type: object
description: Scan options used by the platform to create the job.
required:
- cluster
properties:
cluster:
type: string
description: |
ID of the cluster to scan for external volumes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: ExternalVolumesTask
discriminator:
propertyName: action
mapping:
scan: ExternalVolumesScanAction.yml
oneOf:
- $ref: ExternalVolumesScanAction.yml
4 changes: 3 additions & 1 deletion platform/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ paths:
"/v1/images/{imageId}/build-log":
$ref: "./paths/images/buildLog.yml"
"/v1/images/tasks":
$ref: paths/images/bulkTasks.yml
$ref: paths/images/rootTasks.yml
"/v1/images/{imageId}/tasks":
$ref: "./paths/images/tasks.yml"

Expand All @@ -586,6 +586,8 @@ paths:
## External Volumes
"/v1/infrastructure/external-volumes":
$ref: "./paths/infrastructure/external-volumes/external-volumes.yml"
"/v1/infrastructure/external-volumes/tasks":
$ref: "./paths/infrastructure/external-volumes/rootTasks.yml"
"/v1/infrastructure/external-volumes/{externalVolumeId}":
$ref: "./paths/infrastructure/external-volumes/external-volume.yml"
"/v1/infrastructure/external-volumes/sources":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ post:
- prune
contents:
type: object
description: Additional contents needed by the platform to create the Job.
description: Additional contents needed by the platform to create the job.
required:
- source_ids
properties:
Expand Down
32 changes: 32 additions & 0 deletions platform/paths/infrastructure/external-volumes/rootTasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
post:
operationId: "createExternalVolumesJob"
summary: Create External Volumes Job
description: |
Create a job for external volumes.

Requires the `external-volumes-manage` capability.
tags:
- External Volumes
parameters: []
requestBody:
description: Parameters for creating a new external volumes job.
content:
application/json:
schema:
$ref: ../../../../components/schemas/infrastructure/external-volumes/rootTasks/ExternalVolumesTask.yml

responses:
202:
description: Returns a job descriptor.
content:
application/json:
schema:
title: "TaskResponse"
type: object
required:
- data
properties:
data:
$ref: ../../../../components/schemas/jobs/JobDescriptor.yml
default:
$ref: ../../../../components/responses/errors/DefaultError.yml