File: allocation_candidates.inc

package info (click to toggle)
placement 14.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,380 kB
  • sloc: python: 17,629; sh: 310; makefile: 61; pascal: 30
file content (108 lines) | stat: -rw-r--r-- 3,701 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
=====================
Allocation candidates
=====================

.. note:: Allocation candidates API requests are available 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.

You can also find additional case studies of the request parameters in the
`Modeling with Provider Trees`_ document.

.. rest_method:: GET /allocation_candidates

Normal Response Codes: 200

Error response codes: badRequest(400)

Request
-------

.. rest_parameters:: parameters.yaml

  - resources: resources_query_ac
  - required: required_traits_unnumbered
  - member_of: allocation_candidates_member_of
  - in_tree: allocation_candidates_in_tree
  - resourcesN: resources_query_granular
  - requiredN: required_traits_granular
  - member_ofN: allocation_candidates_member_of_granular
  - in_treeN: allocation_candidates_in_tree_granular
  - group_policy: allocation_candidates_group_policy
  - limit: allocation_candidates_limit
  - root_required: allocation_candidates_root_required
  - same_subtree: allocation_candidates_same_subtree

Response (microversions 1.12 - )
--------------------------------

.. rest_parameters:: parameters.yaml

  - allocation_requests: allocation_requests
  - provider_summaries: provider_summaries_1_12
  - allocations: allocations_by_resource_provider
  - resources: resources
  - capacity: capacity
  - used: used
  - traits: traits_1_17
  - parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_29
  - root_provider_uuid: resource_provider_root_provider_uuid_1_29
  - mappings: mappings

Response Example (microversions 1.34 - )
----------------------------------------

.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.34.json
   :language: javascript

Response Example (microversions 1.29 - 1.33)
--------------------------------------------

.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.29.json
   :language: javascript

Response Example (microversions 1.17 - 1.28)
--------------------------------------------

.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.17.json
   :language: javascript

Response Example (microversions 1.12 - 1.16)
--------------------------------------------

.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.12.json
   :language: javascript

Response (microversions 1.10 - 1.11)
------------------------------------

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

Response Example (microversions 1.10 - 1.11)
--------------------------------------------

.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates.json
   :language: javascript

.. _`Modeling with Provider Trees`: https://docs.openstack.org/placement/latest/usage/provider-tree.html