Add API ref for <ClusterID>/actions/resize

Task: 29737
Story: 2005054

Change-Id: I5511303c8c08a330bdfc0104290c6f8f1831e4b2
This commit is contained in:
Feilong Wang 2019-02-28 15:05:44 +13:00
parent 714ee99756
commit 66c6666a83
3 changed files with 75 additions and 0 deletions

View File

@ -263,3 +263,60 @@ Response Example
.. literalinclude:: samples/cluster-create-resp.json
:language: javascript
Resize a cluster
================
.. rest_method:: POST /v1/clusters/{cluster_ident}/actions/resize
Resize a cluster.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 202
.. rest_status_code:: error status.yaml
- 401
- 403
- 404
- 409
Request
-------
.. rest_parameters:: parameters.yaml
- cluster_ident: cluster_ident
- node_count: node_count
- nodes_to_remove: nodes_to_remove
- nodegroup: nodegroup
.. note::
The nodegroup is just a placeholder for future. It hasn't been supported
in Magnum now.
Request Example
----------------
.. literalinclude:: samples/cluster-resize-req.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- X-Openstack-Request-Id: request_id
- uuid: cluster_id
Response Example
----------------
.. literalinclude:: samples/cluster-create-resp.json
:language: javascript

View File

@ -428,12 +428,25 @@ node_count:
in: body
required: true
type: integer
nodegroup:
description: |
The ID of node group. A node group is a subset of node instances within
a cluster that all have the same configuration.
in: body
required: false
type: string
nodes:
description: |
The total number of nodes including master nodes.
in: body
required: true
type: integer
nodes_to_remove:
description: |
The server ID list will be removed.
in: body
required: false
type: array
op:
description: |
The operation used to modify resource's attributes. Supported operations

View File

@ -0,0 +1,5 @@
{
"node_count": 3,
"nodes_to_remove": ["e74c40e0-d825-11e2-a28f-0800200c9a66"],
"nodegroup": "production_group"
}