Listing resource providers
GET /resource_providers
List resource providers.
Request
Parameters
Name | In | Type | Description |
---|---|---|---|
name (Optional) |
query | string | The name of a resource provider to filter the list. |
uuid (Optional) |
query | string | The UUID of a resource provider. |
member_of (Optional) |
query | string |
A string representing an aggregate uuid; or the prefix member_of=5e08ea53-c4c6-448e-9334-ac4953de3cfa member_of=in:42896e0d-205d-4fe3-bd1e-100924931787,5e08ea53-c4c6-448e-9334-ac4953de3cfa Starting from microversion 1.24, specifying multiple member_of=AGGA_UUID&member_of=in:AGGB_UUID,AGGC_UUID Starting from microversion 1.32, specifying forbidden aggregates is supported in the member_of=AGGA_UUID&member_of=!AGGB_UUID would translate logically to “Candidate resource providers must be in AGGA and NOT in AGGB.”
We do NOT support member_of=!in:AGGA_UUID,AGGB_UUID,AGGC_UUID member_of=!AGGA_UUID&member_of=!AGGB_UUID&member_of=!AGGC_UUID We do not check if the same aggregate uuid is in both positive and negative expression to return 400 BadRequest. We still return 200 for such cases. For example: member_of=AGGA_UUID&member_of=!AGGA_UUID would return an empty list for member_of=in:AGGA_UUID,AGGB_UUID&member_of=!AGGA_UUID would return resource providers that are NOT in AGGA but in AGGB. New in version 1.3 |
resources (Optional) |
query | string |
A comma-separated list of strings indicating an amount of resource of a specified class that a provider must have the capacity and availability to serve: resources=VCPU:4,DISK_GB:64,MEMORY_MB:2048 Note that the amount must be an integer greater than 0. New in version 1.4 |
in_tree (Optional) |
query | string |
A UUID of a resource provider. The returned resource providers will be in the same “provider tree” as the specified provider. New in version 1.14 |
required (Optional) |
query | string |
A comma-delimited list of string trait names. Results will be filtered to include only resource providers having all the specified traits. Starting from microversion 1.22, traits which are forbidden from any resource provider may be expressed by prefixing a trait with a New in version 1.18 |
Example
curl -ks -H 'Content-Type: application/json' -H 'OpenStack-API-Version: placement 1.32' -H 'X-Auth-Token: gAAAAA<...>' \ https://<node_IP_addr>:8780/resource_providers
Response
Parameters
Name | In | Type | Description |
---|---|---|---|
resource_providers
|
body | array | A list of resource_provider objects. |
generation
|
body | integer | A consistent view marker that assists with the management of concurrent resource provider updates. |
name
|
body | string | The name of one resource provider. |
uuid
|
body | string | The UUID of a resource provider. |
links
|
body | array |
A list of links associated with one resource provider. Aggregates relationship link is available starting from version 1.1. Traits relationship link is available starting from version 1.6. Allocations relationship link is available starting from version 1.11. |
parent_provider_uuid
|
body | string |
The UUID of the immediate parent of the resource provider. New in version 1.14 |
root_provider_uuid
|
body | string |
Read-only UUID of the top-most provider in this provider tree. New in version 1.14 |
Status codes
Success
Code | Reason |
---|---|
200 - OK
|
Request was successful. |
Error
Code | Reason |
---|---|
400 - Bad Request
|
Some content in the request was invalid. |
Example
{ "resource_providers": [ { "uuid": "34233b75-4022-4539-9e3f-305e9f9f1f18", "parent_provider_uuid": null, "generation": 546, "links": [ { "href": "/resource_providers/34233b75-4022-4539-9e3f-305e9f9f1f18", "rel": "self" }, { "href": "/resource_providers/34233b75-4022-4539-9e3f-305e9f9f1f18/inventories", "rel": "inventories" }, { "href": "/resource_providers/34233b75-4022-4539-9e3f-305e9f9f1f18/usages", "rel": "usages" }, { "href": "/resource_providers/34233b75-4022-4539-9e3f-305e9f9f1f18/aggregates", "rel": "aggregates" }, { "href": "/resource_providers/34233b75-4022-4539-9e3f-305e9f9f1f18/traits", "rel": "traits" }, { "href": "/resource_providers/34233b75-4022-4539-9e3f-305e9f9f1f18/allocations", "rel": "allocations" } ], "root_provider_uuid": "34233b75-4022-4539-9e3f-305e9f9f1f18", "name": "node1.vstoragedomain" } ] }