Browse Source

Merge "Add API ref for <ClusterID>/actions/resize"

changes/08/642008/5
Zuul 2 years ago
committed by Gerrit Code Review
parent
commit
a6c8c399e9
  1. 57
      api-ref/source/clusters.inc
  2. 13
      api-ref/source/parameters.yaml
  3. 5
      api-ref/source/samples/cluster-resize-req.json

57
api-ref/source/clusters.inc

@ -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

13
api-ref/source/parameters.yaml

@ -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

5
api-ref/source/samples/cluster-resize-req.json

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