cinder/api-ref/source/v3/quota-sets.inc
Sean McGinnis a96fad9f3b Fix api-ref response code title levels
Using the wrong character resulted in the wrong title level
being used for the response codes, which in turn caused the
"detail" show/hide toggle to not be able to hide all of the
per-endpoint details. This corrects these to be at the correct
level.

Also ran into issues after changing them where sphinx was not
happy with the random title levels. This appears to be due to
the order processed and whether not earlier included files had
all subsequent levels. Adding an additional title in our first
included file resolved that problem.

Change-Id: I19405778980310f2d6d06eb7b23102f74a3d6e03
Closes-bug: #1755566
2018-03-13 15:57:54 -05:00

280 lines
5.8 KiB
ReStructuredText

.. -*- rst -*-
Quota sets extension (os-quota-sets)
====================================
Administrators only, depending on policy settings.
Shows, updates, and deletes quotas for a project.
Show quotas for a project
~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{admin_project_id}/os-quota-sets/{project_id}
Shows quotas for a project.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
Request
-------
.. rest_parameters:: parameters.yaml
- admin_project_id: admin_project_id
- project_id: quotas_project_id
- usage: usage
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- quota_set: quota_set
- id: project_id
- volumes: volumes_number
- volumes_{volume_type}: volumes_number_for_type
- snapshots: snapshots_number
- snapshots_{volume_type}: snapshots_number_for_type
- backups: backups_number
- groups: groups_number
- per_volume_gigabytes: per_volume_gigabytes
- gigabytes: gigabytes
- gigabytes_{volume_type}: gigabytes_for_type
- backup_gigabytes: backup_gigabytes
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-response.json
:language: javascript
Show quota usage for a project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{admin_project_id}/os-quota-sets/{project_id}?{usage}=True
Shows quota usage for a project.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: quotas_project_id
- admin_project_id: admin_project_id
- usage: usage
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- quota_set: quota_set
- id: project_id
- volumes: volumes_number_usage
- volumes_{volume_type}: volumes_number_for_type_usage
- snapshots: snapshots_number_usage
- snapshots_{volume_type}: snapshots_number_for_type_usage
- backups: backups_number_usage
- groups: groups_number_usage
- per_volume_gigabytes: per_volume_gigabytes_usage
- gigabytes: gigabytes_usage
- gigabytes_{volume_type}: gigabytes_for_type_usage
- backup_gigabytes: backup_gigabytes_usage
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-usage-response.json
:language: javascript
Update quotas for a project
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PUT /v3/{admin_project_id}/os-quota-sets/{project_id}
Updates quotas for a project.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
Request
-------
.. rest_parameters:: parameters.yaml
- admin_project_id: admin_project_id
- project_id: quotas_project_id
- quota_set: quota_set
- volumes: volumes_number
- volumes_{volume_type}: volumes_number_for_type
- snapshots: snapshots_number
- snapshots_{volume_type}: snapshots_number_for_type
- backups: backups_number
- groups: groups_number
- per_volume_gigabytes: per_volume_gigabytes
- gigabytes: gigabytes
- gigabytes_{volume_type}: gigabytes_for_type
- backup_gigabytes: backup_gigabytes
Request Example
---------------
.. literalinclude:: ./samples/quotas-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- quota_set: quota_set
- volumes: volumes_number
- volumes_{volume_type}: volumes_number_for_type
- snapshots: snapshots_number
- snapshots_{volume_type}: snapshots_number_for_type
- backups: backups_number
- groups: groups_number
- per_volume_gigabytes: per_volume_gigabytes
- gigabytes: gigabytes
- gigabytes_{volume_type}: gigabytes_for_type
- backup_gigabytes: backup_gigabytes
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Delete quotas for a project
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v3/{admin_project_id}/os-quota-sets/{project_id}
Deletes quotas for a project so the quotas revert to default values.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: quotas_project_id
- admin_project_id: admin_project_id
Get default quotas for a project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{admin_project_id}/os-quota-sets/{project_id}/defaults
Gets default quotas for a project.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- admin_project_id: admin_project_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- quota_set: quota_set
- id: project_id
- volumes: volumes_number
- volumes_{volume_type}: volumes_number_for_type
- snapshots: snapshots_number
- snapshots_{volume_type}: snapshots_number_for_type
- backups: backups_number
- groups: groups_number
- per_volume_gigabytes: per_volume_gigabytes
- gigabytes: gigabytes
- gigabytes_{volume_type}: gigabytes_for_type
- backup_gigabytes: backup_gigabytes
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-defaults-response.json
:language: javascript
Validate setup for nested quota
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{admin_project_id}/os-quota-sets/validate_setup_for_nested_quota_use
Validate setup for nested quota, administrator should ensure that Keystone v3 or greater is
being used.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 400
Request
-------
.. rest_parameters:: parameters.yaml
- admin_project_id: admin_project_id
- fix_allocated_quotas: fix_allocated_quotas