summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorDmitry Tantsur <divius.inside@gmail.com>2019-03-27 17:30:48 +0100
committerDmitry Tantsur <divius.inside@gmail.com>2019-05-21 20:09:21 +0200
commit8f6bf4f9dd3f3e27e0c0cf0fab06601a9904f2f7 (patch)
tree9cebf68a65f4fd1260b51cf994507a92f07b2993 /api-ref
parent5edf4f3fdabedd1ae55ba94b65379c2e33cdfeae (diff)
downloadironic-8f6bf4f9dd3f3e27e0c0cf0fab06601a9904f2f7.tar.gz
Allocation API: backfilling allocations
This feature addresses the case of moving the already deployed nodes under the allocation API. Change-Id: I29d0bd3663e0d1b27727a700c0f0e0fb6ceac1d9 Story: #2005014 Task: #29491
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/baremetal-api-v1-allocation.inc9
-rw-r--r--api-ref/source/parameters.yaml18
2 files changed, 25 insertions, 2 deletions
diff --git a/api-ref/source/baremetal-api-v1-allocation.inc b/api-ref/source/baremetal-api-v1-allocation.inc
index a233a6dbb..91b21c99d 100644
--- a/api-ref/source/baremetal-api-v1-allocation.inc
+++ b/api-ref/source/baremetal-api-v1-allocation.inc
@@ -36,9 +36,17 @@ the ``allocating`` state, and the process continues in the background. If it
succeeds, the ``node_uuid`` field is populated with the Node's UUID, and the
Node's ``instance_uuid`` field is set to the Allocation's UUID.
+If you want to backfill an allocation for an already deployed node, you can
+pass the UUID or name of this node to ``node``. In this case the allocation
+is created immediately, bypassing the normal allocation process. Other
+parameters must be missing or match the provided node.
+
.. versionadded:: 1.52
Allocation API was introduced.
+.. versionadded:: 1.58
+ Added support for backfilling allocations.
+
Normal response codes: 201
Error response codes: 400, 401, 403, 409, 503
@@ -54,6 +62,7 @@ Request
- traits: req_allocation_traits
- uuid: req_uuid
- extra: req_extra
+ - node: req_allocation_node
Request Example
---------------
diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml
index 36d5a01bd..fd88e8736 100644
--- a/api-ref/source/parameters.yaml
+++ b/api-ref/source/parameters.yaml
@@ -443,7 +443,9 @@ allocation_node:
type: string
allocation_resource_class:
description: |
- The resource class requested for the allocation.
+ The resource class requested for the allocation. Can be ``null`` if
+ the allocation was created via backfilling and the target node did not
+ have the resource class set.
in: body
required: true
type: string
@@ -1237,9 +1239,21 @@ req_allocation_name:
in: body
required: false
type: string
+req_allocation_node:
+ description: |
+ The node UUID or name to create the allocation against, bypassing
+ the normal allocation process.
+
+ .. warning:: This field must not be used to request a normal allocation
+ with one candidate node, use ``candidate_nodes`` instead.
+ in: body
+ required: false
+ type: string
req_allocation_resource_class:
description: |
- The requested resource class for the allocation.
+ The requested resource class for the allocation. Can only be missing when
+ backfilling an allocation (will be set to the node's ``resource_class``
+ in such case).
in: body
required: true
type: string