2017-07-06 15:23:26 +03:00
|
|
|
=====================
|
|
|
|
Allocation candidates
|
|
|
|
=====================
|
|
|
|
|
|
|
|
.. note:: Allocation candidates API requests are availiable starting from version 1.10.
|
|
|
|
|
|
|
|
List allocation candidates
|
|
|
|
==========================
|
|
|
|
|
|
|
|
Returns a dictionary representing a collection of allocation requests
|
|
|
|
and resource provider summaries. Each allocation request has
|
|
|
|
information to form a ``PUT /allocations/{consumer_uuid}`` request to claim
|
|
|
|
resources against a related set of resource providers. Additional parameters
|
|
|
|
might be required, see `Update allocations`_. As several allocation
|
|
|
|
requests are available it's necessary to select one. To make a
|
|
|
|
decision, resource provider summaries are provided with the
|
|
|
|
inventory/capacity information. For example, this information is used by
|
|
|
|
nova-scheduler's FilterScheduler to make decisions about on which compute host
|
|
|
|
to build a server.
|
|
|
|
|
2019-03-16 22:10:45 +00:00
|
|
|
You can also find additional case studies of the request parameters in the
|
|
|
|
`Modeling with Provider Trees`_ document.
|
|
|
|
|
2017-07-06 15:23:26 +03:00
|
|
|
.. rest_method:: GET /allocation_candidates
|
|
|
|
|
|
|
|
Normal Response Codes: 200
|
|
|
|
|
|
|
|
Error response codes: badRequest(400)
|
|
|
|
|
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2018-04-25 16:55:58 -05:00
|
|
|
- resources: resources_query_ac
|
|
|
|
- required: required_traits_unnumbered
|
2019-03-29 06:51:29 +00:00
|
|
|
- member_of: allocation_candidates_member_of
|
2019-02-08 06:20:35 +00:00
|
|
|
- in_tree: allocation_candidates_in_tree
|
2018-04-25 16:55:58 -05:00
|
|
|
- resourcesN: resources_query_granular
|
|
|
|
- requiredN: required_traits_granular
|
2019-03-29 06:51:29 +00:00
|
|
|
- member_ofN: allocation_candidates_member_of_granular
|
2019-02-08 06:20:35 +00:00
|
|
|
- in_treeN: allocation_candidates_in_tree_granular
|
2018-04-25 16:55:58 -05:00
|
|
|
- group_policy: allocation_candidates_group_policy
|
|
|
|
- limit: allocation_candidates_limit
|
2017-07-06 15:23:26 +03:00
|
|
|
|
2017-10-16 21:27:40 +01:00
|
|
|
Response (microversions 1.12 - )
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- allocation_requests: allocation_requests
|
2018-08-07 17:58:53 +09:00
|
|
|
- provider_summaries: provider_summaries_1_12
|
2017-10-16 21:27:40 +01:00
|
|
|
- allocations: allocations_by_resource_provider
|
|
|
|
- resources: resources
|
|
|
|
- capacity: capacity
|
|
|
|
- used: used
|
2018-06-26 17:54:40 +09:00
|
|
|
- traits: traits_1_17
|
2018-08-07 17:58:53 +09:00
|
|
|
- parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_29
|
|
|
|
- root_provider_uuid: resource_provider_root_provider_uuid_1_29
|
2017-10-16 21:27:40 +01:00
|
|
|
|
2018-08-07 17:58:53 +09:00
|
|
|
Response Example (microversions 1.29 - )
|
2017-10-16 21:27:40 +01:00
|
|
|
----------------------------------------
|
|
|
|
|
2018-08-07 17:58:53 +09:00
|
|
|
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.29.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response Example (microversions 1.17 - 1.28)
|
|
|
|
--------------------------------------------
|
|
|
|
|
2018-06-26 17:54:40 +09:00
|
|
|
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.17.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response Example (microversions 1.12 - 1.16)
|
|
|
|
--------------------------------------------
|
|
|
|
|
2017-12-25 13:03:17 +09:00
|
|
|
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.12.json
|
2017-10-16 21:27:40 +01:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response (microversions 1.10 - 1.11)
|
|
|
|
------------------------------------
|
2017-07-06 15:23:26 +03:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- allocation_requests: allocation_requests
|
|
|
|
- provider_summaries: provider_summaries
|
|
|
|
- allocations: allocations_array
|
|
|
|
- resource_provider: resource_provider_object
|
|
|
|
- uuid: resource_provider_uuid
|
|
|
|
- resources: resources
|
|
|
|
- capacity: capacity
|
|
|
|
- used: used
|
|
|
|
|
2017-10-16 21:27:40 +01:00
|
|
|
Response Example (microversions 1.10 - 1.11)
|
|
|
|
--------------------------------------------
|
2017-07-06 15:23:26 +03:00
|
|
|
|
2017-12-25 13:03:17 +09:00
|
|
|
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates.json
|
2017-10-16 21:27:40 +01:00
|
|
|
:language: javascript
|
2019-03-16 22:10:45 +00:00
|
|
|
|
|
|
|
.. _`Modeling with Provider Trees`: https://docs.openstack.org/placement/latest/usage/provider-tree.html
|