Merge "api ref for quota details extension"

This commit is contained in:
Jenkins 2017-09-19 16:34:20 +00:00 committed by Gerrit Code Review
commit 067cd3c295
4 changed files with 90 additions and 0 deletions

View File

@ -44,6 +44,7 @@ Resource Management
.. include:: metering.inc
.. include:: network-ip-availability.inc
.. include:: quotas.inc
.. include:: quota_details.inc
.. include:: service-providers.inc
.. include:: tags.inc
##################

View File

@ -4496,6 +4496,15 @@ quota:
in: body
required: true
type: object
quota-detail:
description: |
A ``quota`` detail object. Each key in the object corresponds to a resource
type (``network``, ``port``, etc.) having a quota. The value for each
resource type is itself an object (the quota set) containing the quota's
``used``, ``limit`` and ``reserved`` integer values.
in: body
required: true
type: object
quota-floatingip:
description: |
The number of floating IP addresses allowed for

View File

@ -0,0 +1,41 @@
.. -*- rst -*-
========================================
Quotas details extension (quota_details)
========================================
Extends the ``quotas`` API to show a quota set for each project that includes
the quota's used, limit and reserved counts per resource.
A quota value of ``-1`` means that quota has no limit.
Show quota details for a tenant
===============================
.. rest_method:: GET /v2.0/quotas/{project_id}/details.json
Shows quota details for a project.
Normal response codes: 200
Error response codes: 401, 403
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id-path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- quota: quota-detail
Response Example
----------------
.. literalinclude:: samples/quota_details/quota-details-show-for-project-response.json
:language: javascript

View File

@ -0,0 +1,39 @@
{
"quota": {
"rbac_policy": {
"used": 4,
"limit": 10,
"reserved": 0
},
"subnetpool": {
"used": 2,
"limit": -1,
"reserved": 0
},
"security_group_rule": {
"used": 10,
"limit": 100,
"reserved": 1
},
"security_group": {
"used": 3,
"limit": 10,
"reserved": 0
},
"subnet": {
"used": 3,
"limit": 100,
"reserved": 0
},
"port": {
"used": 21,
"limit": 500,
"reserved": 3
},
"network" :{
"used": 9,
"limit": 100,
"reserved": 2
}
}
}