Merge "Add API document for quota usage."
This commit is contained in:
commit
58e1a03744
@ -377,7 +377,7 @@ status_query:
|
|||||||
type: boolean
|
type: boolean
|
||||||
usage:
|
usage:
|
||||||
description: |
|
description: |
|
||||||
Set to ``usage=true`` to show quota usage.
|
Show project's quota usage information.
|
||||||
Default is ``false``.
|
Default is ``false``.
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
@ -405,13 +405,6 @@ alias:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
allocated:
|
|
||||||
description: |
|
|
||||||
Allocated data size. Visible only if you set the
|
|
||||||
``usage=true`` query parameter.
|
|
||||||
in: body
|
|
||||||
required: false
|
|
||||||
type: integer
|
|
||||||
attach_mode:
|
attach_mode:
|
||||||
description: |
|
description: |
|
||||||
The attach mode of attachment, read-only ('ro') or
|
The attach mode of attachment, read-only ('ro') or
|
||||||
@ -491,10 +484,18 @@ backup:
|
|||||||
type: object
|
type: object
|
||||||
backup_gigabytes:
|
backup_gigabytes:
|
||||||
description: |
|
description: |
|
||||||
The size(GB) of backups that are allowed for each project.
|
The size (GB) of backups that are allowed for each project.
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
backup_gigabytes_usage:
|
||||||
|
description: |
|
||||||
|
The size (GB) usage information of backup for this project, including ``in_use``,
|
||||||
|
``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
backups:
|
backups:
|
||||||
description: |
|
description: |
|
||||||
A list of ``backup`` objects.
|
A list of ``backup`` objects.
|
||||||
@ -507,6 +508,14 @@ backups_number:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
backups_number_usage:
|
||||||
|
description: |
|
||||||
|
The backup usage information for this project, including ``in_use``,
|
||||||
|
``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
bootable:
|
bootable:
|
||||||
description: |
|
description: |
|
||||||
Enables or disables the bootable attribute. You
|
Enables or disables the bootable attribute. You
|
||||||
@ -898,17 +907,34 @@ free_capacity:
|
|||||||
type: string
|
type: string
|
||||||
gigabytes:
|
gigabytes:
|
||||||
description: |
|
description: |
|
||||||
The size(GB) of volumes and snapshots that are allowed for each project.
|
The size (GB) of volumes and snapshots that are allowed for each project.
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
gigabytes_for_type:
|
gigabytes_for_type:
|
||||||
description: |
|
description: |
|
||||||
The size(GB) of volumes and snapshots that are allowed for each project
|
The size (GB) of volumes and snapshots that are allowed for each project
|
||||||
and the specifed volume type.
|
and the specifed volume type.
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
gigabytes_for_type_usage:
|
||||||
|
description: |
|
||||||
|
The size (GB) usage information of volumes and snapshots for this project
|
||||||
|
and this volume type, including ``in_use``, ``limit``, ``reserved`` and
|
||||||
|
``allocated`` attributes. Note: ``allocated`` attribute is available only
|
||||||
|
when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
|
gigabytes_usage:
|
||||||
|
description: |
|
||||||
|
The size (GB) usage information of volumes and snapshots for this project,
|
||||||
|
including ``in_use``, ``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
group_id_1:
|
group_id_1:
|
||||||
description: |
|
description: |
|
||||||
The ID of the group.
|
The ID of the group.
|
||||||
@ -953,6 +979,14 @@ groups_number:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
groups_number_usage:
|
||||||
|
description: |
|
||||||
|
The group usage information for this project, including ``in_use``,
|
||||||
|
``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
guaranteed_until:
|
guaranteed_until:
|
||||||
description: |
|
description: |
|
||||||
The expire time of the message, this message could be
|
The expire time of the message, this message could be
|
||||||
@ -1066,13 +1100,6 @@ imageRef:
|
|||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
in_use:
|
|
||||||
description: |
|
|
||||||
The in use data size. Visible only if you set the
|
|
||||||
``usage=true`` query parameter.
|
|
||||||
in: body
|
|
||||||
required: false
|
|
||||||
type: integer
|
|
||||||
incremental:
|
incremental:
|
||||||
description: |
|
description: |
|
||||||
The backup mode. A valid value is ``true`` for
|
The backup mode. A valid value is ``true`` for
|
||||||
@ -1134,13 +1161,6 @@ keys:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: array
|
type: array
|
||||||
limit_usage:
|
|
||||||
description: |
|
|
||||||
The limit data size. Visible only if you set the
|
|
||||||
``usage=true`` query parameter.
|
|
||||||
in: body
|
|
||||||
required: false
|
|
||||||
type: integer
|
|
||||||
limits:
|
limits:
|
||||||
description: |
|
description: |
|
||||||
A list of ``limit`` objects.
|
A list of ``limit`` objects.
|
||||||
@ -1684,10 +1704,19 @@ os-volume_upload_image:
|
|||||||
type: object
|
type: object
|
||||||
per_volume_gigabytes:
|
per_volume_gigabytes:
|
||||||
description: |
|
description: |
|
||||||
The size(GB) of volumes that are allowed for each volume.
|
The size (GB) of volumes that are allowed for each volume.
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
per_volume_gigabytes_usage:
|
||||||
|
description: |
|
||||||
|
The size (GB) usage information for each volume, including ``in_use``,
|
||||||
|
``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota
|
||||||
|
is enabled and only ``limit`` is meaningful here.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
pool_name:
|
pool_name:
|
||||||
description: |
|
description: |
|
||||||
The name of the storage pool.
|
The name of the storage pool.
|
||||||
@ -1820,13 +1849,6 @@ request_id:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
reserved:
|
|
||||||
description: |
|
|
||||||
Reserved data size. Visible only if you set the
|
|
||||||
``usage=true`` query parameter.
|
|
||||||
in: body
|
|
||||||
required: false
|
|
||||||
type: integer
|
|
||||||
reserved_percentage:
|
reserved_percentage:
|
||||||
description: |
|
description: |
|
||||||
The percentage of the total capacity that is
|
The percentage of the total capacity that is
|
||||||
@ -1969,6 +1991,22 @@ snapshots_number_for_type:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
snapshots_number_for_type_usage:
|
||||||
|
description: |
|
||||||
|
The snapshot usage information for this project and this volume type,
|
||||||
|
including ``in_use``, ``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
|
snapshots_number_usage:
|
||||||
|
description: |
|
||||||
|
The snapshot usage information for this project, including ``in_use``,
|
||||||
|
``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
source-name:
|
source-name:
|
||||||
description: |
|
description: |
|
||||||
The resource's name.
|
The resource's name.
|
||||||
@ -2427,3 +2465,19 @@ volumes_number_for_type:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
volumes_number_for_type_usage:
|
||||||
|
description: |
|
||||||
|
The volume usage information for this project and this volume type,
|
||||||
|
including ``in_use``, ``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
|
volumes_number_usage:
|
||||||
|
description: |
|
||||||
|
The volume usage information for this project, including ``in_use``,
|
||||||
|
``limit``, ``reserved`` and ``allocated`` attributes.
|
||||||
|
Note: ``allocated`` attribute is available only when nested quota is enabled.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
|
@ -47,10 +47,6 @@ Response Parameters
|
|||||||
- gigabytes: gigabytes
|
- gigabytes: gigabytes
|
||||||
- gigabytes_{volume_type}: gigabytes_for_type
|
- gigabytes_{volume_type}: gigabytes_for_type
|
||||||
- backup_gigabytes: backup_gigabytes
|
- backup_gigabytes: backup_gigabytes
|
||||||
- in_use: in_use
|
|
||||||
- reserved: reserved
|
|
||||||
- limit: limit_usage
|
|
||||||
- allocated: allocated
|
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
@ -58,6 +54,55 @@ Response Example
|
|||||||
.. literalinclude:: ./samples/quotas-show-response.json
|
.. literalinclude:: ./samples/quotas-show-response.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Show quota usage for a project
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. rest_method:: GET /v3/{admin_project_id}/os-quota-sets/{project_id}?{usage}=True
|
||||||
|
|
||||||
|
Shows quota usage for a project.
|
||||||
|
|
||||||
|
|
||||||
|
Normal response codes: 200
|
||||||
|
Error response codes:
|
||||||
|
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- project_id: quotas_project_id
|
||||||
|
- admin_project_id: admin_project_id
|
||||||
|
- usage: usage
|
||||||
|
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- quota_set: quota_set
|
||||||
|
- id: project_id
|
||||||
|
- volumes: volumes_number_usage
|
||||||
|
- volumes_{volume_type}: volumes_number_for_type_usage
|
||||||
|
- snapshots: snapshots_number_usage
|
||||||
|
- snapshots_{volume_type}: snapshots_number_for_type_usage
|
||||||
|
- backups: backups_number_usage
|
||||||
|
- groups: groups_number_usage
|
||||||
|
- per_volume_gigabytes: per_volume_gigabytes_usage
|
||||||
|
- gigabytes: gigabytes_usage
|
||||||
|
- gigabytes_{volume_type}: gigabytes_for_type_usage
|
||||||
|
- backup_gigabytes: backup_gigabytes_usage
|
||||||
|
|
||||||
|
Response Example
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. literalinclude:: ./samples/quotas-show-usage-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Update quotas for a project
|
Update quotas for a project
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
65
api-ref/source/v3/samples/quotas-show-usage-response.json
Normal file
65
api-ref/source/v3/samples/quotas-show-usage-response.json
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"quota_set": {
|
||||||
|
"id": "a7090a26bc554d93aa845a4d41808251",
|
||||||
|
"volumes": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"volumes_lvmdriver-1": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": -1,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"snapshots": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"snapshots_lvmdriver-1": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": -1,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"backups": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"groups": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": 10,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"per_volume_gigabytes": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": -1,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"gigabytes": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": 1000,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"gigabytes_lvmdriver-1": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": 1000,
|
||||||
|
"in_use": 0
|
||||||
|
},
|
||||||
|
"backup_gigabytes": {
|
||||||
|
"reserved": 0,
|
||||||
|
"allocated": 0,
|
||||||
|
"limit": 1000,
|
||||||
|
"in_use": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user