Add complete lifecycle to API doc

Complete lifecycle API was implemented as part of lifecycle hook
implementation in [1]. This commit updates the API doc to include the
new complete lifecycle API.

[1] 3dd9f3ecde

Change-Id: I4f7f61e5580eb95d2ae3b04d59b843d75d47fced
This commit is contained in:
Duc Truong 2018-07-11 23:07:41 +00:00
parent d4949fea00
commit 7a6011d262
3 changed files with 70 additions and 0 deletions

View File

@ -1097,3 +1097,61 @@ Response Example
.. literalinclude:: samples/cluster-action-response.json
:language: javascript
Complete Lifecycle on a Cluster action
======================================
.. rest_method:: POST /v1/clusters/{cluster_id}/actions
Complete lifecycle action and trigger deletion of nodes.
This API is only available since API microversion 1.9.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 202
.. rest_status_code:: error status.yaml
- 400
- 401
- 403
- 404
- 503
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- OpenStack-API-Version: microversion
- cluster_id: cluster_id_url
- action: action_request
- lifecycle_action_token: lifecycle_token_id
The ``action_name`` in the body must be ``complete_lifecycle``.
Request Example
---------------
.. literalinclude:: samples/cluster-complete-lifecycle-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- X-OpenStack-Request-ID: request_id
- Location: location
- action: action_action
Response Example
----------------
.. literalinclude:: samples/cluster-action-response.json
:language: javascript

View File

@ -827,6 +827,13 @@ interval:
An integer that indicates the interval in seconds between two consecutive
executions of a repeatable action.
lifecycle_token_id:
type: UUID
in: body
required: True
description: |
The UUID of the lifecycle action to be completed.
max_size:
type: integer
in: body

View File

@ -0,0 +1,5 @@
{
"complete_lifecycle": {
"lifecycle_action_token": "ffbb9175-d510-4bc1-b676-c6aba2a4ca81"
}
}