nova/placement-api-ref/source/get-resource_providers.json
Stephen Finucane 109f21f3c8 placement: adds REST API for nested providers
Adds a new microversion (1.14) to the placement REST API for supporting
nested resource providers.

For POST /resource_providers and PUT /resource_providers/{uuid}, a new
optional 'parent_provider_uuid' field is added to the request payload.

For GET /resource_providers/{uuid} responses, the
'parent_provider_uuid' field and a convenience field called
'root_provider_uuid' are provided.

For GET /resource_providers, a new '?in_tree=<rp_uuid>' parameter is
supported. This parameter accepts a UUID of a resource provider. This
will cause the resulting list of resource providers to be only the
providers within the same "provider tree" as the provider identified by
<rp_uuid>

Clients for the placement REST API can specify either
'OpenStack-API-Version: placement 1.14' or 'placement latest' to handle
the new 'parent_provider_uuid' attribute and to query for resource
providers in a provider tree.

Change-Id: I4db74e4dc682bc03df6ec94cd1c3a5f5dc927a7b
blueprint: nested-resource-providers
APIImpact
2017-12-06 10:48:09 -06:00

71 lines
2.1 KiB
JSON

{
"resource_providers": [
{
"generation": 1,
"uuid": "99c09379-6e52-4ef8-9a95-b9ce6f68452e",
"links": [
{
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e",
"rel": "self"
},
{
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/aggregates",
"rel": "aggregates"
},
{
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/inventories",
"rel": "inventories"
},
{
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/usages",
"rel": "usages"
},
{
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/traits",
"rel": "traits"
},
{
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/allocations",
"rel": "allocations"
}
],
"name": "vgr.localdomain",
"parent_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8",
"root_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8"
},
{
"generation": 2,
"uuid": "d0b381e9-8761-42de-8e6c-bba99a96d5f5",
"links": [
{
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5",
"rel": "self"
},
{
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/aggregates",
"rel": "aggregates"
},
{
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/inventories",
"rel": "inventories"
},
{
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/usages",
"rel": "usages"
},
{
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/traits",
"rel": "traits"
},
{
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/allocations",
"rel": "allocations"
}
],
"name": "pony1",
"parent_provider_uuid": null,
"root_provider_uuid": "d0b381e9-8761-42de-8e6c-bba99a96d5f5"
}
]
}