Add docs for quota_class_set API
We have implemented quota-classes-show and quota-classes-update api, but no api-ref is documented. This patch is to add api-ref in the docs. Change-Id: I275ee4fe048607a49368c4f985c055ab3a3bbfb6 Closes-bug: #1751683
This commit is contained in:
parent
0286c2051e
commit
cc4afb9aad
@ -26,6 +26,7 @@ Shared File Systems API
|
||||
.. include:: availability-zones.inc
|
||||
.. include:: os-share-manage.inc
|
||||
.. include:: quota-sets.inc
|
||||
.. include:: quota-classes.inc
|
||||
.. include:: user-messages.inc
|
||||
|
||||
======================================
|
||||
|
@ -26,6 +26,12 @@ message_id:
|
||||
in: path
|
||||
required: false
|
||||
type: string
|
||||
quota_class_name:
|
||||
description:
|
||||
The name of the quota class for which to set quotas.
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
security_service_id_path:
|
||||
description: |
|
||||
The UUID of the security service.
|
||||
@ -1636,6 +1642,28 @@ maxTotalShareGigabytes:
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
maxTotalShareGigabytesOptional:
|
||||
description: |
|
||||
The total maximum number of share gigabytes that
|
||||
are allowed in a project. You cannot request a share that exceeds
|
||||
the allowed gigabytes quota.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
maxTotalShareGroups:
|
||||
description: |
|
||||
The maximum number of share groups.
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
min_version: 2.40
|
||||
maxTotalShareGroupSnapshots:
|
||||
description: |
|
||||
The maximum number of share group snapshots.
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
min_version: 2.40
|
||||
maxTotalShareNetworks:
|
||||
description: |
|
||||
The total maximum number of share-networks that
|
||||
@ -1643,6 +1671,13 @@ maxTotalShareNetworks:
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
maxTotalShareNetworksOptional:
|
||||
description: |
|
||||
The total maximum number of share-networks that
|
||||
are allowed in a project.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
maxTotalShares:
|
||||
description: |
|
||||
The total maximum number of shares that are
|
||||
@ -1657,6 +1692,20 @@ maxTotalShareSnapshots:
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
maxTotalShareSnapshotsOptional:
|
||||
description: |
|
||||
The total maximum number of share snapshots that
|
||||
are allowed in a project.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
maxTotalSharesOptional:
|
||||
description: |
|
||||
The total maximum number of shares that are
|
||||
allowed in a project.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
maxTotalSnapshotGigabytes:
|
||||
description: |
|
||||
The total maximum number of snapshot gigabytes
|
||||
@ -1664,6 +1713,13 @@ maxTotalSnapshotGigabytes:
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
maxTotalSnapshotGigabytesOptional:
|
||||
description: |
|
||||
The total maximum number of snapshot gigabytes
|
||||
that are allowed in a project.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
message_level_body:
|
||||
in: body
|
||||
required: true
|
||||
@ -1997,6 +2053,18 @@ qos:
|
||||
in: body
|
||||
required: true
|
||||
type: boolean
|
||||
quota_class_id:
|
||||
description: |
|
||||
A ``quota_class_set`` id.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
quota_class_set:
|
||||
description: |
|
||||
A ``quota_class_set`` object.
|
||||
in: body
|
||||
required: true
|
||||
type: object
|
||||
quota_gigabytes:
|
||||
description: |
|
||||
The number of gigabytes allowed for each tenant.
|
||||
|
104
api-ref/source/quota-classes.inc
Normal file
104
api-ref/source/quota-classes.inc
Normal file
@ -0,0 +1,104 @@
|
||||
.. -*- rst -*-
|
||||
|
||||
===============
|
||||
Quota class set
|
||||
===============
|
||||
|
||||
Quota classes can be shown and updated for a project.
|
||||
|
||||
Show quota classes for a project
|
||||
================================
|
||||
|
||||
.. rest_method:: GET /v2/{tenant_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.
|
||||
|
||||
Normal response codes: 200
|
||||
|
||||
Error response codes: forbidden(403), itemNotFound(404)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant_id: tenant_id
|
||||
- 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/{tenant_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.
|
||||
|
||||
Normal response codes: 200
|
||||
|
||||
Error response codes: badRequest(400), forbidden(403), itemNotFound(404)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant_id: tenant_id
|
||||
- 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
|
12
api-ref/source/samples/quota-classes-show-response.json
Normal file
12
api-ref/source/samples/quota-classes-show-response.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"share_groups": 50,
|
||||
"gigabytes": 1000,
|
||||
"share_group_snapshots": 50,
|
||||
"snapshots": 50,
|
||||
"snapshot_gigabytes": 1000,
|
||||
"shares": 50,
|
||||
"id": "default",
|
||||
"share_networks": 10
|
||||
}
|
||||
}
|
6
api-ref/source/samples/quota-classes-update-request.json
Normal file
6
api-ref/source/samples/quota-classes-update-request.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"class_name": "test-qupta-class-update",
|
||||
"gigabytes": 20
|
||||
}
|
||||
}
|
11
api-ref/source/samples/quota-classes-update-response.json
Normal file
11
api-ref/source/samples/quota-classes-update-response.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"share_groups": 50,
|
||||
"gigabytes": 20,
|
||||
"share_group_snapshots": 50,
|
||||
"snapshots": 50,
|
||||
"snapshot_gigabytes": 1000,
|
||||
"shares": 50,
|
||||
"share_networks": 10
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user