Update responses for Celery tasks

This commit is contained in:
Joshua Boniface 2024-09-13 11:47:04 -04:00
parent cf5ee23a18
commit 5c3ce358df
1 changed files with 66 additions and 67 deletions

View File

@ -2801,7 +2801,7 @@ class API_VM_Locks(Resource):
- vm - vm
responses: responses:
202: 202:
description: OK description: Accepted
schema: schema:
type: string type: string
description: The Celery job ID of the task description: The Celery job ID of the task
@ -2924,11 +2924,11 @@ class API_VM_Device(Resource):
required: true required: true
description: The raw Libvirt XML definition of the device to attach description: The raw Libvirt XML definition of the device to attach
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Bad request description: Bad request
schema: schema:
@ -2978,11 +2978,11 @@ class API_VM_Device(Resource):
required: true required: true
description: The raw Libvirt XML definition of the device to detach description: The raw Libvirt XML definition of the device to detach
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Bad request description: Bad request
schema: schema:
@ -3234,11 +3234,11 @@ class API_VM_Snapshot(Resource):
required: false required: false
description: A custom name for the snapshot instead of autogeneration by date description: A custom name for the snapshot instead of autogeneration by date
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Execution error description: Execution error
schema: schema:
@ -3292,11 +3292,11 @@ class API_VM_Snapshot(Resource):
required: true required: true
description: The name of the snapshot to remove description: The name of the snapshot to remove
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Execution error description: Execution error
schema: schema:
@ -3356,11 +3356,11 @@ class API_VM_Snapshot_Rollback(Resource):
required: true required: true
description: The name of the snapshot to roll back to description: The name of the snapshot to roll back to
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Execution error description: Execution error
schema: schema:
@ -3436,15 +3436,15 @@ class API_VM_Snapshot_Export(Resource):
description: The absolute file path to export the snapshot to on the active primary coordinator description: The absolute file path to export the snapshot to on the active primary coordinator
- in: query - in: query
name: incremental_parent name: incremental_parent
type: boolean type: string
required: false required: false
description: A snapshot name to generate an incremental diff from description: A snapshot name to generate an incremental diff from
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Execution error description: Execution error
schema: schema:
@ -3529,11 +3529,11 @@ class API_VM_Snapshot_Import(Resource):
default: true default: true
description: Whether or not to retain the (parent, if incremental) volume snapshot after restore description: Whether or not to retain the (parent, if incremental) volume snapshot after restore
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Execution error description: Execution error
schema: schema:
@ -3692,14 +3692,11 @@ class API_VM_Autobackup_Root(Resource):
type: string type: string
example: "user@domain.tld" example: "user@domain.tld"
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
properties: description: The Celery job ID of the task
task_id:
type: string
description: Task ID for the provisioner Celery worker
400: 400:
description: Bad request description: Bad request
schema: schema:
@ -5264,11 +5261,16 @@ class API_Storage_Ceph_Benchmark(Resource):
required: true required: true
description: The PVC storage pool to benchmark description: The PVC storage pool to benchmark
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: string type: string
description: The Celery job ID of the benchmark (unused elsewhere) description: The Celery job ID of the task
400:
description: Bad request
schema:
type: object
id: Message
""" """
# Verify that the pool is valid # Verify that the pool is valid
_list, code = api_helper.ceph_pool_list( _list, code = api_helper.ceph_pool_list(
@ -5392,11 +5394,11 @@ class API_Storage_Ceph_OSDDB_Root(Resource):
required: true required: true
description: The block device (e.g. "/dev/sdb", "/dev/disk/by-path/...", etc.) or detect string ("detect:NAME:SIZE:ID") to create the OSD DB volume group on description: The block device (e.g. "/dev/sdb", "/dev/disk/by-path/...", etc.) or detect string ("detect:NAME:SIZE:ID") to create the OSD DB volume group on
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Bad request description: Bad request
schema: schema:
@ -5591,11 +5593,11 @@ class API_Storage_Ceph_OSD_Root(Resource):
required: false required: false
description: If set, create this many OSDs on the block device instead of 1; usually 2 or 4 depending on size description: If set, create this many OSDs on the block device instead of 1; usually 2 or 4 depending on size
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Bad request description: Bad request
schema: schema:
@ -5706,11 +5708,11 @@ class API_Storage_Ceph_OSD_Element(Resource):
required: false required: false
description: If set, creates an OSD DB LV for the replacement OSD with this explicit size in human units (e.g. 1024M, 20G); if unset, use existing ext_db_size description: If set, creates an OSD DB LV for the replacement OSD with this explicit size in human units (e.g. 1024M, 20G); if unset, use existing ext_db_size
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Bad request description: Bad request
schema: schema:
@ -5764,11 +5766,11 @@ class API_Storage_Ceph_OSD_Element(Resource):
required: true required: true
description: The block device (e.g. "/dev/sdb", "/dev/disk/by-path/...", etc.) or detect string ("detect:NAME:SIZE:ID") that the OSD should be using description: The block device (e.g. "/dev/sdb", "/dev/disk/by-path/...", etc.) or detect string ("detect:NAME:SIZE:ID") that the OSD should be using
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
400: 400:
description: Bad request description: Bad request
schema: schema:
@ -5830,11 +5832,11 @@ class API_Storage_Ceph_OSD_Element(Resource):
required: true required: true
description: A confirmation string to ensure that the API consumer really means it description: A confirmation string to ensure that the API consumer really means it
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
id: Message description: The Celery job ID of the task
404: 404:
description: Not found description: Not found
schema: schema:
@ -9531,14 +9533,11 @@ class API_Provisioner_Create_Root(Resource):
type: string type: string
description: Script install() function keywork argument in "arg=data" format; may be specified multiple times to add multiple arguments description: Script install() function keywork argument in "arg=data" format; may be specified multiple times to add multiple arguments
responses: responses:
200: 202:
description: OK description: Accepted
schema: schema:
type: object type: string
properties: description: The Celery job ID of the task
task_id:
type: string
description: Task ID for the provisioner Celery worker
400: 400:
description: Bad request description: Bad request
schema: schema: