[api-ref] Refactor Manila quota set API

This patch refactors Manila quota set API to make it be readable
and maintainable.

Change-Id: I0a275b3ab4dc8e7ba5675562599bd853f03fa30e
This commit is contained in:
Ha Van Tu 2016-09-21 17:03:35 +07:00
parent cbb58baada
commit 02a0cb8b3e
2 changed files with 109 additions and 109 deletions

View File

@ -396,7 +396,7 @@ status_6:
in: query in: query
required: false required: false
type: string type: string
user_id_1: user_id_query:
description: | description: |
The UUID of the user. If you specify this query parameter, The UUID of the user. If you specify this query parameter,
you update the quotas for this user in the tenant. you update the quotas for this user in the tenant.
@ -1430,18 +1430,6 @@ free_capacity_gb:
in: body in: body
required: true required: true
type: string type: string
gigabytes:
description: |
The number of gigabytes allowed for each tenant.
in: body
required: true
type: integer
gigabytes_1:
description: |
The number of gigabytes for the tenant.
in: body
required: false
type: integer
has_replicas: has_replicas:
description: | description: |
(Since API v2.11) Indicates whether a share has (Since API v2.11) Indicates whether a share has
@ -1570,13 +1558,6 @@ id_14:
in: body in: body
required: true required: true
type: string type: string
id_15:
description: |
The UUID of the tenant for which you manage
quotas.
in: body
required: true
type: string
id_16: id_16:
description: | description: |
The UUID of the snapshot. The UUID of the snapshot.
@ -2115,12 +2096,82 @@ qos:
in: body in: body
required: true required: true
type: boolean type: boolean
quota_gigabytes:
description: |
The number of gigabytes allowed for each tenant.
in: body
required: true
type: integer
quota_gigabytes_request:
description: |
The number of gigabytes for the tenant.
in: body
required: false
type: integer
quota_set: quota_set:
description: | description: |
The ``quota_set`` object. The ``quota_set`` object.
in: body in: body
required: true required: true
type: object type: object
quota_share_networks:
description: |
The number of share networks allowed for each
tenant.
in: body
required: true
type: integer
quota_share_networks_request:
description: |
The number of share networks for the tenant.
in: body
required: false
type: integer
quota_shares:
description: |
The number of shares allowed for each tenant.
in: body
required: true
type: integer
quota_shares_request:
description: |
The number of shares for the tenant.
in: body
required: false
type: integer
quota_snapshot_gigabytes:
description: |
The number of gigabytes for the snapshots allowed
for each tenant.
in: body
required: true
type: integer
quota_snapshot_gigabytes_request:
description: |
The number of gigabytes for the snapshots for the
tenant.
in: body
required: false
type: integer
quota_snapshots:
description: |
The number of snapshots allowed for each tenant.
in: body
required: true
type: integer
quota_snapshots_request:
description: |
The number of snapshots for the tenant.
in: body
required: false
type: integer
quota_tenant_id:
description: |
The UUID of the tenant for which you manage
quotas.
in: body
required: true
type: string
regex: regex:
description: | description: |
An API regular expression. For example, An API regular expression. For example,
@ -2458,19 +2509,6 @@ share_network_name:
in: body in: body
required: true required: true
type: string type: string
share_networks:
description: |
The number of share networks allowed for each
tenant.
in: body
required: true
type: integer
share_networks_1:
description: |
The number of share networks for the tenant.
in: body
required: false
type: integer
share_proto: share_proto:
description: | description: |
The Shared File Systems protocol. A valid value The Shared File Systems protocol. A valid value
@ -2569,18 +2607,6 @@ share_types_1:
in: body in: body
required: true required: true
type: array type: array
shares:
description: |
The number of shares allowed for each tenant.
in: body
required: true
type: integer
shares_1:
description: |
The number of shares for the tenant.
in: body
required: false
type: integer
shrink: shrink:
description: | description: |
The ``shrink`` object. The ``shrink`` object.
@ -2613,20 +2639,6 @@ size_3:
in: body in: body
required: true required: true
type: integer type: integer
snapshot_gigabytes:
description: |
The number of gigabytes for the snapshots allowed
for each tenant.
in: body
required: true
type: integer
snapshot_gigabytes_1:
description: |
The number of gigabytes for the snapshots for the
tenant.
in: body
required: false
type: integer
snapshot_id: snapshot_id:
description: | description: |
The UUID of the snapshot from which to create the The UUID of the snapshot from which to create the
@ -2672,18 +2684,6 @@ snapshot_support_3:
in: body in: body
required: false required: false
type: boolean type: boolean
snapshots:
description: |
The number of snapshots allowed for each tenant.
in: body
required: true
type: integer
snapshots_1:
description: |
The number of snapshots for the tenant.
in: body
required: false
type: integer
source_cgsnapshot_id: source_cgsnapshot_id:
description: | description: |
The ID of the consistency group snapshot from The ID of the consistency group snapshot from

View File

@ -12,8 +12,8 @@ Provides quotas management support.
``os-quota-sets``. ``os-quota-sets``.
Show default quotas Show default quota set
=================== ======================
.. rest_method:: GET /v2/{tenant_id}/quota-sets/{tenant_id}/defaults .. rest_method:: GET /v2/{tenant_id}/quota-sets/{tenant_id}/defaults
@ -27,7 +27,7 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- tenant_id: tenant_id_1 - tenant_id: tenant_id_path
- tenant_id: tenant_id - tenant_id: tenant_id
Response parameters Response parameters
@ -36,12 +36,12 @@ Response parameters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- quota_set: quota_set - quota_set: quota_set
- id: id_15 - id: quota_tenant_id
- gigabytes: gigabytes - gigabytes: quota_gigabytes
- snapshots: snapshots - snapshots: quota_snapshots
- shares: shares - shares: quota_shares
- snapshot_gigabytes: snapshot_gigabytes - snapshot_gigabytes: quota_snapshot_gigabytes
- share_networks: share_networks - share_networks: quota_share_networks
Response example Response example
---------------- ----------------
@ -50,8 +50,8 @@ Response example
:language: javascript :language: javascript
Show quotas Show quota set
=========== ==============
.. rest_method:: GET /v2/{tenant_id}/quota-sets/{tenant_id}?user_id={user_id} .. rest_method:: GET /v2/{tenant_id}/quota-sets/{tenant_id}?user_id={user_id}
@ -69,9 +69,9 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- tenant_id: tenant_id_1 - tenant_id: tenant_id_path
- tenant_id: tenant_id - tenant_id: tenant_id
- user_id: user_id_1 - user_id: user_id_query
Response parameters Response parameters
------------------- -------------------
@ -79,12 +79,12 @@ Response parameters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- quota_set: quota_set - quota_set: quota_set
- id: id_15 - id: quota_tenant_id
- gigabytes: gigabytes - gigabytes: quota_gigabytes
- snapshots: snapshots - snapshots: quota_snapshots
- shares: shares - shares: quota_shares
- snapshot_gigabytes: snapshot_gigabytes - snapshot_gigabytes: quota_snapshot_gigabytes
- share_networks: share_networks - share_networks: quota_share_networks
Response example Response example
---------------- ----------------
@ -93,8 +93,8 @@ Response example
:language: javascript :language: javascript
Update quotas Update quota set
============= ================
.. rest_method:: PUT /v2/{tenant_id}/quota-sets/{tenant_id}?user_id={user_id} .. rest_method:: PUT /v2/{tenant_id}/quota-sets/{tenant_id}?user_id={user_id}
@ -112,16 +112,16 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- tenant_id: tenant_id_1 - tenant_id: tenant_id_path
- tenant_id: tenant_id - tenant_id: tenant_id
- user_id: user_id_1 - user_id: user_id_query
- quota_set: quota_set - quota_set: quota_set
- force: force - force: force
- gigabytes: gigabytes_1 - gigabytes: quota_gigabytes_request
- snapshots: snapshots_1 - snapshots: quota_snapshots_request
- snapshot_gigabytes: snapshot_gigabytes_1 - snapshot_gigabytes: quota_snapshot_gigabytes_request
- shares: shares_1 - shares: quota_shares_request
- share_networks: share_networks_1 - share_networks: quota_share_networks_request
Request example Request example
--------------- ---------------
@ -135,12 +135,12 @@ Response parameters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- quota_set: quota_set - quota_set: quota_set
- id: id_15 - id: quota_tenant_id
- gigabytes: gigabytes - gigabytes: quota_gigabytes
- snapshots: snapshots - snapshots: quota_snapshots
- shares: shares - shares: quota_shares
- snapshot_gigabytes: snapshot_gigabytes - snapshot_gigabytes: quota_snapshot_gigabytes
- share_networks: share_networks - share_networks: quota_share_networks
Response example Response example
---------------- ----------------
@ -149,8 +149,8 @@ Response example
:language: javascript :language: javascript
Delete quotas Delete quota set
============= ================
.. rest_method:: DELETE /v2/{tenant_id}/quota-sets/{tenant_id}?user_id={user_id} .. rest_method:: DELETE /v2/{tenant_id}/quota-sets/{tenant_id}?user_id={user_id}
@ -168,6 +168,6 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- tenant_id: tenant_id_1 - tenant_id: tenant_id_path
- tenant_id: tenant_id - tenant_id: tenant_id
- user_id: user_id_1 - user_id: user_id_query