[placement] Add api-ref for GET resource provider

This provides simple documentation of the response body and path
parameters when listing a single resource provider.

Change-Id: I84d472067e4365d59cab4863f87df9d24718701f
This commit is contained in:
Andrey Volkov 2017-05-24 11:26:59 +03:00
parent 4897245ee2
commit 91cb70323d
6 changed files with 84 additions and 2 deletions

View File

@ -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"
}

View File

@ -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"

View File

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

View File

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

View File

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

View File

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