[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
required: false
type: string
user_id_1:
user_id_query:
description: |
The UUID of the user. If you specify this query parameter,
you update the quotas for this user in the tenant.
@ -1430,18 +1430,6 @@ free_capacity_gb:
in: body
required: true
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:
description: |
(Since API v2.11) Indicates whether a share has
@ -1570,13 +1558,6 @@ id_14:
in: body
required: true
type: string
id_15:
description: |
The UUID of the tenant for which you manage
quotas.
in: body
required: true
type: string
id_16:
description: |
The UUID of the snapshot.
@ -2115,12 +2096,82 @@ qos:
in: body
required: true
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:
description: |
The ``quota_set`` object.
in: body
required: true
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:
description: |
An API regular expression. For example,
@ -2458,19 +2509,6 @@ share_network_name:
in: body
required: true
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:
description: |
The Shared File Systems protocol. A valid value
@ -2569,18 +2607,6 @@ share_types_1:
in: body
required: true
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:
description: |
The ``shrink`` object.
@ -2613,20 +2639,6 @@ size_3:
in: body
required: true
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:
description: |
The UUID of the snapshot from which to create the
@ -2672,18 +2684,6 @@ snapshot_support_3:
in: body
required: false
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:
description: |
The ID of the consistency group snapshot from

View File

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