[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:
27
placement-api-ref/source/get-resource_provider.json
Normal file
27
placement-api-ref/source/get-resource_provider.json
Normal 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"
|
||||||
|
}
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
{
|
{
|
||||||
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/usages",
|
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/usages",
|
||||||
"rel": "usages"
|
"rel": "usages"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/traits",
|
||||||
|
"rel": "traits"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "vgr.localdomain"
|
"name": "vgr.localdomain"
|
||||||
@@ -42,6 +46,10 @@
|
|||||||
{
|
{
|
||||||
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/usages",
|
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/usages",
|
||||||
"rel": "usages"
|
"rel": "usages"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/traits",
|
||||||
|
"rel": "traits"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "pony1"
|
"name": "pony1"
|
||||||
|
|||||||
@@ -14,5 +14,6 @@ Openstack Placement API concepts, please refer to the
|
|||||||
|
|
||||||
.. include:: root.inc
|
.. include:: root.inc
|
||||||
.. include:: resource_providers.inc
|
.. include:: resource_providers.inc
|
||||||
|
.. include:: resource_provider.inc
|
||||||
.. include:: inventories.inc
|
.. include:: inventories.inc
|
||||||
.. include:: inventory.inc
|
.. include:: inventory.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
|
the provider or if the provider's inventory is updated by another
|
||||||
thread while attempting the operation.
|
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
|
.. rest_method:: DELETE /resource_providers/{uuid}/inventories
|
||||||
|
|
||||||
|
|||||||
@@ -107,8 +107,11 @@ resource_provider_links:
|
|||||||
type: array
|
type: array
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
description: >
|
description: |
|
||||||
A list of links associated with one resource provider.
|
A list of links associated with one resource provider.
|
||||||
|
|
||||||
|
.. note:: Trait relationship link is available starting from version 1.6.
|
||||||
|
|
||||||
resource_provider_name:
|
resource_provider_name:
|
||||||
type: string
|
type: string
|
||||||
in: body
|
in: body
|
||||||
|
|||||||
43
placement-api-ref/source/resource_provider.inc
Normal file
43
placement-api-ref/source/resource_provider.inc
Normal 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
|
||||||
Reference in New Issue
Block a user