Merge "[Api-ref] Add worker cleanup for service docs api"

This commit is contained in:
Jenkins 2017-08-23 02:18:14 +00:00 committed by Gerrit Code Review
commit 873e7a2f17
5 changed files with 108 additions and 0 deletions

View File

@ -48,3 +48,4 @@ Block Storage API V3 (CURRENT)
our nice alphabetical ordering our nice alphabetical ordering
.. include:: quota-classes.inc .. include:: quota-classes.inc
.. include:: quota-sets.inc .. include:: quota-sets.inc
.. include:: worker-cleanup.inc

View File

@ -522,6 +522,12 @@ backups_number_usage:
in: body in: body
required: true required: true
type: object type: object
binary:
description: |
The service binary.
in: body
required: false
type: string
bootable: bootable:
description: | description: |
Enables or disables the bootable attribute. You Enables or disables the bootable attribute. You
@ -803,6 +809,12 @@ detached_at:
in: body in: body
required: false required: false
type: string type: string
disabled:
description: |
Filter by disabled status.
in: body
required: false
type: boolean
disk_format: disk_format:
description: | description: |
Disk format for the new image. Default is raw. Disk format for the new image. Default is raw.
@ -1154,6 +1166,12 @@ is_public_1:
in: body in: body
required: false required: false
type: boolean type: boolean
is_up:
description: |
Filter by up/down status.
in: body
required: false
type: boolean
key: key:
description: | description: |
The metadata key name for the metadata that you The metadata key name for the metadata that you
@ -1918,6 +1936,12 @@ resource_filters:
in: body in: body
required: true required: true
type: array type: array
resource_id:
description: |
The UUID of a resource to cleanup.
in: body
required: false
type: string
resource_type: resource_type:
description: | description: |
The resource type corresponding to ``resource_uuid``. The resource type corresponding to ``resource_uuid``.
@ -1949,6 +1973,12 @@ safe_to_manage:
in: body in: body
required: true required: true
type: boolean type: boolean
service_id:
description: |
UUID for the cleanup service.
in: body
required: false
type: string
service_state: service_state:
description: | description: |
The state of the service. One of ``available`` or ``unavailable``. The state of the service. One of ``available`` or ``unavailable``.

View File

@ -0,0 +1,9 @@
{
"cluster": "test",
"disabled": "True",
"host": "127.0.0.1",
"is_up": "True",
"binary": "cinder-volume",
"resource_id": "b122f668-d15a-40f8-af21-38d218796ab8",
"resource_type": "Volume"
}

View File

@ -0,0 +1,11 @@
{
"cleaning": [
{
"id": "dd233343-er34-fr43-54ss-vfdfft433fdf",
"host": "127.0.0.1",
"binary": "cinder-volume",
"cluster_name": "test"
}
],
"unavailable": []
}

View File

@ -0,0 +1,57 @@
.. -*- rst -*-
Workers (workers)
=================
Cleanup services
~~~~~~~~~~~~~~~~
.. rest_method:: POST v3/{project_id}/workers/cleanup
Request cleanup of services with optional filtering. This API is only
available with microversion 3.24 or later.
Normal response codes: 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- cluster: cluster_mutex
- host: host_service
- binary: binary
- is-up: is_up
- disabled: disabled
- resource-id: resource_id
- resource-type: resource_type
Request Example
---------------
.. literalinclude:: ./samples/worker-cleanup-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- host: host_service
- binary: binary
- id: service_id
- cluster_name: cluster_mutex
Response Example
----------------
.. literalinclude:: ./samples/worker-cleanup-response.json
:language: javascript