cinder/api-ref/source/v3/quota-sets.inc
Mark T. Voelker 931e2f8161 Create v3 API Reference
The Cinder v3 API was marked CURRENT in Mitaka, but there no API ref
was ever created.  This is problematic for end users and would hinder
the v3 API from being included in DefCore Interoperability Guidelines
somewhere down the line (since one of DefCore's Criteria[1] is that a
Capability be well documented).  This patch creates an API ref for v3.
It also adds a header to the v2 index to show that it is SUPPORTED,
whereas v3 is CURRENT.

[1]
http://git.openstack.org/cgit/openstack/defcore/tree/doc/source/process/CoreCriteria.rst#n77

Change-Id: Ia3a8050cd04ad3a487a79d80acf9691feee6182e
Closes-Bug: #1616072
2016-09-19 14:33:01 -04:00

408 lines
8.6 KiB
ReStructuredText

.. -*- rst -*-
====================================
Quota sets extension (os-quota-sets)
====================================
Administrators only, depending on policy settings.
Shows, updates, and deletes quotas for a tenant.
Show quotas for a user
======================
.. rest_method:: GET /v3/{admin_tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Enables an admin user to show quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Update quotas for a user
========================
.. rest_method:: PUT /v3/{admin_tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Updates quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Request Example
---------------
.. literalinclude:: ./samples/quotas-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Delete quotas for a user
========================
.. rest_method:: DELETE /v3/{admin_tenant_id}/os-quota-sets/{tenant_id}/{user_id}
Deletes quotas for a user so that the quotas revert to default values.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Response Example
----------------
.. literalinclude:: ./samples/quotas-delete-response.json
:language: javascript
Show quotas for a tenant
========================
.. rest_method:: GET /v3/{admin_tenant_id}/os-quota-sets/{tenant_id}
Shows quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- admin_tenant_id: admin_tenant_id
- usage: usage
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-response.json
:language: javascript
Update quotas for a tenant
==========================
.. rest_method:: PUT /v3/{admin_tenant_id}/os-quota-sets/{tenant_id}
Updates quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
- tenant_id: tenant_id
- admin_tenant_id: admin_tenant_id
Request Example
---------------
.. literalinclude:: ./samples/quotas-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Delete quotas for a tenant
==========================
.. rest_method:: DELETE /v3/{admin_tenant_id}/os-quota-sets/{tenant_id}
Deletes quotas for a tenant so the quotas revert to default values.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- admin_tenant_id: admin_tenant_id
Response Example
----------------
.. literalinclude:: ./samples/quotas-delete-response.json
:language: javascript
Show quota details for a user
=============================
.. rest_method:: GET /v3/{admin_tenant_id}/os-quota-sets/{tenant_id}/detail/{user_id}
Shows details for quotas for a tenant and user.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- user_id: user_id
- admin_tenant_id: admin_tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-update-response.json
:language: javascript
Get default quotas for a tenant
===============================
.. rest_method:: GET /v3/{tenant_id}/os-quota-sets/defaults
Gets default quotas for a tenant.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- injected_file_content_bytes: injected_file_content_bytes
- metadata_items: metadata_items
- reserved: reserved
- in_use: in_use
- ram: ram
- floating_ips: floating_ips
- key_pairs: key_pairs
- injected_file_path_bytes: injected_file_path_bytes
- instances: instances
- security_group_rules: security_group_rules
- injected_files: injected_files
- quota_set: quota_set
- cores: cores
- fixed_ips: fixed_ips
- id: id
- security_groups: security_groups
Response Example
----------------
.. literalinclude:: ./samples/quotas-show-defaults-response.json
:language: javascript