diff --git a/placement-api-ref/source/get-resource_provider.json b/placement-api-ref/source/get-resource_provider.json new file mode 100644 index 000000000..7de2a36ac --- /dev/null +++ b/placement-api-ref/source/get-resource_provider.json @@ -0,0 +1,27 @@ +{ + "generation": 0, + "links": [ + { + "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868", + "rel": "self" + }, + { + "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/aggregates", + "rel": "aggregates" + }, + { + "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/inventories", + "rel": "inventories" + }, + { + "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/usages", + "rel": "usages" + }, + { + "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/traits", + "rel": "traits" + } + ], + "name": "Ceph Storage Pool", + "uuid": "3b4005be-d64b-456f-ba36-0ffd02718868" +} diff --git a/placement-api-ref/source/get-resource_providers.json b/placement-api-ref/source/get-resource_providers.json index be1a72a3a..1f2860d5d 100644 --- a/placement-api-ref/source/get-resource_providers.json +++ b/placement-api-ref/source/get-resource_providers.json @@ -19,6 +19,10 @@ { "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/usages", "rel": "usages" + }, + { + "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/traits", + "rel": "traits" } ], "name": "vgr.localdomain" @@ -42,6 +46,10 @@ { "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/usages", "rel": "usages" + }, + { + "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/traits", + "rel": "traits" } ], "name": "pony1" diff --git a/placement-api-ref/source/index.rst b/placement-api-ref/source/index.rst index bd16ab29d..bc09d9358 100644 --- a/placement-api-ref/source/index.rst +++ b/placement-api-ref/source/index.rst @@ -14,5 +14,6 @@ Openstack Placement API concepts, please refer to the .. include:: root.inc .. include:: resource_providers.inc +.. include:: resource_provider.inc .. include:: inventories.inc .. include:: inventory.inc diff --git a/placement-api-ref/source/inventories.inc b/placement-api-ref/source/inventories.inc index f9acd830b..a62c0d05d 100644 --- a/placement-api-ref/source/inventories.inc +++ b/placement-api-ref/source/inventories.inc @@ -107,7 +107,7 @@ The request returns an HTTP 409 when there are alllocations against the provider or if the provider's inventory is updated by another thread while attempting the operation. -.. note:: Method is availiable starting from version 1.5. +.. note:: Method is available starting from version 1.5. .. rest_method:: DELETE /resource_providers/{uuid}/inventories diff --git a/placement-api-ref/source/parameters.yaml b/placement-api-ref/source/parameters.yaml index 00beec3c7..c39253b41 100644 --- a/placement-api-ref/source/parameters.yaml +++ b/placement-api-ref/source/parameters.yaml @@ -107,8 +107,11 @@ resource_provider_links: type: array in: body required: true - description: > + description: | A list of links associated with one resource provider. + + .. note:: Trait relationship link is available starting from version 1.6. + resource_provider_name: type: string in: body diff --git a/placement-api-ref/source/resource_provider.inc b/placement-api-ref/source/resource_provider.inc new file mode 100644 index 000000000..884dc6b81 --- /dev/null +++ b/placement-api-ref/source/resource_provider.inc @@ -0,0 +1,43 @@ +================= +Resource Provider +================= + +See `Resource providers`_ for a description. +This group of API calls works with a single resource provider +identified by `uuid`. One resource provider can be listed, updated and +deleted. + +Show resource provider +====================== + +.. rest_method:: GET /resource_providers/{uuid} + +Return a representation of the resource provider identified by `{uuid}`. + +Normal Response Codes: 200 + +Error response codes: itemNotFound(404) + +Request +------- + +.. rest_parameters:: parameters.yaml + + - uuid: resource_provider_uuid_path + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - generation: resource_provider_generation + - uuid: resource_provider_uuid + - links: resource_provider_links + - name: resource_provider_name + + +Response Example +---------------- + +.. literalinclude:: get-resource_provider.json + :language: javascript