Browse Source

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

Zuul 1 month ago
parent
commit
f0d49da37d

+ 57
- 0
api-ref/source/clusters.inc View File

@@ -263,3 +263,60 @@ Response Example
263 263
 
264 264
 .. literalinclude:: samples/cluster-create-resp.json
265 265
    :language: javascript
266
+
267
+
268
+Resize a cluster
269
+================
270
+
271
+.. rest_method:: POST /v1/clusters/{cluster_ident}/actions/resize
272
+
273
+Resize a cluster.
274
+
275
+Response Codes
276
+--------------
277
+
278
+.. rest_status_code:: success status.yaml
279
+
280
+   - 202
281
+
282
+.. rest_status_code:: error status.yaml
283
+
284
+   - 401
285
+   - 403
286
+   - 404
287
+   - 409
288
+
289
+Request
290
+-------
291
+
292
+.. rest_parameters:: parameters.yaml
293
+
294
+  - cluster_ident: cluster_ident
295
+  - node_count: node_count
296
+  - nodes_to_remove: nodes_to_remove
297
+  - nodegroup: nodegroup
298
+
299
+.. note::
300
+
301
+   The nodegroup is just a placeholder for future. It hasn't been supported
302
+   in Magnum now.
303
+
304
+Request Example
305
+----------------
306
+
307
+.. literalinclude:: samples/cluster-resize-req.json
308
+   :language: javascript
309
+
310
+Response
311
+--------
312
+
313
+.. rest_parameters:: parameters.yaml
314
+
315
+  - X-Openstack-Request-Id: request_id
316
+  - uuid: cluster_id
317
+
318
+Response Example
319
+----------------
320
+
321
+.. literalinclude:: samples/cluster-create-resp.json
322
+   :language: javascript

+ 13
- 0
api-ref/source/parameters.yaml View File

@@ -428,12 +428,25 @@ node_count:
428 428
   in: body
429 429
   required: true
430 430
   type: integer
431
+nodegroup:
432
+  description: |
433
+    The ID of node group. A node group is a subset of node instances within
434
+    a cluster that all have the same configuration.
435
+  in: body
436
+  required: false
437
+  type: string
431 438
 nodes:
432 439
   description: |
433 440
     The total number of nodes including master nodes.
434 441
   in: body
435 442
   required: true
436 443
   type: integer
444
+nodes_to_remove:
445
+  description: |
446
+    The server ID list will be removed.
447
+  in: body
448
+  required: false
449
+  type: array
437 450
 op:
438 451
   description: |
439 452
     The operation used to modify resource's attributes. Supported operations

+ 5
- 0
api-ref/source/samples/cluster-resize-req.json View File

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

Loading…
Cancel
Save