d7140ffe09
Nowadays "project" and "project_id" are used instead of "tenant" in the OpenStack world. See [1] and [2]. - Replace "tenant_id" in the API paths to "project_id" - For most manila resources, the "project_id" in an API response body refers to the project that owns the resource. So, create a unified parameter and share that across the APIs. - Fix path variable names, and their order - Fix usage of "UUID" to refer to project and user IDs - Fix query parameters [1] https://docs.openstack.org/operations-guide/ops-projects-users.html [2] https://developer.openstack.org/api-ref/identity/v3/index.html#projects Partial-Bug: #1760644 Co-Authored-By: Goutham Pacha Ravi <gouthampravi@gmail.com> Change-Id: I64e4ef8ad258d07c7d80d11a4d015c4b82156722
120 lines
2.6 KiB
ReStructuredText
120 lines
2.6 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
===============
|
|
Quota class set
|
|
===============
|
|
|
|
Quota classes can be shown and updated for a project.
|
|
|
|
Show quota classes for a project
|
|
================================
|
|
|
|
.. rest_method:: GET /v2/{project_id}/quota-class-sets/{quota_class_name}
|
|
|
|
Shows quota class set for a project. If no specific value for the quota class
|
|
resource exists, then the default value will be reported.
|
|
|
|
Response codes
|
|
--------------
|
|
|
|
.. rest_status_code:: success status.yaml
|
|
|
|
- 200
|
|
|
|
.. rest_status_code:: error status.yaml
|
|
|
|
- 403
|
|
- 404
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- quota_class_name: quota_class_name
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- quota_class_set: quota_class_set
|
|
- share_groups: maxTotalShareGroups
|
|
- gigabytes: maxTotalShareGigabytes
|
|
- share_group_snapshots: maxTotalShareGroupSnapshots
|
|
- snapshots: maxTotalShareSnapshots
|
|
- snapshot_gigabytes: maxTotalSnapshotGigabytes
|
|
- shares: maxTotalShares
|
|
- id: quota_class_id
|
|
- share_networks: maxTotalShareNetworks
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/quota-classes-show-response.json
|
|
:language: javascript
|
|
|
|
|
|
Update quota classes for a project
|
|
==================================
|
|
|
|
.. rest_method:: PUT /v2/{project_id}/quota-class-sets/{quota_class_name}
|
|
|
|
Updates quota class set for a project. If the ``quota_class_name`` key does not
|
|
exist, then the API will create one.
|
|
|
|
Response codes
|
|
--------------
|
|
|
|
.. rest_status_code:: success status.yaml
|
|
|
|
- 200
|
|
|
|
.. rest_status_code:: error status.yaml
|
|
|
|
- 400
|
|
- 403
|
|
- 404
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- quota_class_name: quota_class_name
|
|
- shares: maxTotalSharesOptional
|
|
- snapshots: maxTotalShareSnapshotsOptional
|
|
- gigabytes: maxTotalShareGigabytesOptional
|
|
- snapshot-gigabytes: maxTotalSnapshotGigabytesOptional
|
|
- share-networks: maxTotalShareNetworksOptional
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ./samples/quota-classes-update-request.json
|
|
:language: javascript
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- quota_class_set: quota_class_set
|
|
- share_groups: maxTotalShareGroups
|
|
- gigabytes: maxTotalShareGigabytes
|
|
- share_group_snapshots: maxTotalShareGroupSnapshots
|
|
- snapshots: maxTotalShareSnapshots
|
|
- snapshot_gigabytes: maxTotalSnapshotGigabytes
|
|
- shares: maxTotalShares
|
|
- share_networks: maxTotalShareNetworks
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/quota-classes-update-response.json
|
|
:language: javascript
|