[placement] Add api-ref for usages
Change-Id: I50954991f80725dc22be95eeecded2ee1e005e97
This commit is contained in:
parent
5f3e136e25
commit
032a1d0a3b
7
placement-api-ref/source/get-usages.json
Normal file
7
placement-api-ref/source/get-usages.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"usages": {
|
||||
"DISK_GB": 5,
|
||||
"MEMORY_MB": 512,
|
||||
"VCPU": 2
|
||||
}
|
||||
}
|
@ -24,3 +24,4 @@ Openstack Placement API concepts, please refer to the
|
||||
.. include:: resource_provider_traits.inc
|
||||
.. include:: allocations.inc
|
||||
.. include:: resource_provider_allocations.inc
|
||||
.. include:: usages.inc
|
||||
|
43
placement-api-ref/source/usages.inc
Normal file
43
placement-api-ref/source/usages.inc
Normal file
@ -0,0 +1,43 @@
|
||||
======
|
||||
Usages
|
||||
======
|
||||
|
||||
Represent the consumption of resources for a project and user.
|
||||
|
||||
.. note:: Usages API requests are available starting from version 1.9.
|
||||
|
||||
List usages
|
||||
===========
|
||||
|
||||
Return a report of usage information for resources associated with the
|
||||
project identified by `project_id` and user identified by
|
||||
`user_id`. The value is a dictionary of resource classes paired with
|
||||
the sum of the allocations of that resource class for provided
|
||||
parameters.
|
||||
|
||||
.. rest_method:: GET /usages
|
||||
|
||||
Normal Response Codes: 200
|
||||
|
||||
Error response codes: badRequest(400)
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- project_id: project_id
|
||||
- user_id: user_id
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- usages: resources
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: get-usages.json
|
||||
:language: javascript
|
Loading…
Reference in New Issue
Block a user