Merge "[placement] Add api-ref for RP allocations"
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"allocations": {
|
||||||
|
"56785a3f-6f1c-4fec-af0b-0faf075b1fcb": {
|
||||||
|
"resources": {
|
||||||
|
"MEMORY_MB": 256,
|
||||||
|
"VCPU": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"9afd5aeb-d6b9-4dea-a588-1e6327a91834": {
|
||||||
|
"resources": {
|
||||||
|
"MEMORY_MB": 512,
|
||||||
|
"VCPU": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"9d16a611-e7f9-4ef3-be26-c61ed01ecefb": {
|
||||||
|
"resources": {
|
||||||
|
"MEMORY_MB": 1024,
|
||||||
|
"VCPU": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resource_provider_generation": 12
|
||||||
|
}
|
@@ -23,3 +23,4 @@ Openstack Placement API concepts, please refer to the
|
|||||||
.. include:: traits.inc
|
.. include:: traits.inc
|
||||||
.. include:: resource_provider_traits.inc
|
.. include:: resource_provider_traits.inc
|
||||||
.. include:: allocations.inc
|
.. include:: allocations.inc
|
||||||
|
.. include:: resource_provider_allocations.inc
|
||||||
|
@@ -174,6 +174,12 @@ resource_classes:
|
|||||||
required: true
|
required: true
|
||||||
description: >
|
description: >
|
||||||
A list of ``resource_class`` objects.
|
A list of ``resource_class`` objects.
|
||||||
|
resource_provider_allocations:
|
||||||
|
type: object
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
description: >
|
||||||
|
A dictionary of allocation records keyed by consumer uuid.
|
||||||
resource_provider_generation:
|
resource_provider_generation:
|
||||||
type: integer
|
type: integer
|
||||||
in: body
|
in: body
|
||||||
|
40
placement-api-ref/source/resource_provider_allocations.inc
Normal file
40
placement-api-ref/source/resource_provider_allocations.inc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
=============================
|
||||||
|
Resource provider allocations
|
||||||
|
=============================
|
||||||
|
|
||||||
|
See `Allocations`_ for a description.
|
||||||
|
|
||||||
|
List resource provider allocations
|
||||||
|
==================================
|
||||||
|
|
||||||
|
Return a representation of all allocations made against this resource
|
||||||
|
provider, keyed by consumer uuid. Each allocation includes one or more
|
||||||
|
classes of resource and the amount consumed.
|
||||||
|
|
||||||
|
.. rest_method:: GET /resource_providers/{uuid}/allocations
|
||||||
|
|
||||||
|
Normal Response Codes: 200
|
||||||
|
|
||||||
|
Error response codes: itemNotFound(404)
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: resource_provider_uuid_path
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- allocations: resource_provider_allocations
|
||||||
|
- resources: resources
|
||||||
|
- resource_provider_generation: resource_provider_generation
|
||||||
|
|
||||||
|
Response Example
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. literalinclude:: get-resource_provider_allocations.json
|
||||||
|
:language: javascript
|
Reference in New Issue
Block a user