From 107d08047609ff9fdb7d5ee5d734f426133ceb44 Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Wed, 14 Jun 2017 12:02:12 +0800 Subject: [PATCH] [Api-ref] Update quota-set APIs ref The api-ref for quota-set is totally wrong. This patch updated it to keep the same with Cinder's behavior. Change-Id: Ib71d53e920a867ff080c929672f3120a639e3a28 Closes-bug: #1696347 --- api-ref/source/v3/parameters.yaml | 173 +++++++++--------- api-ref/source/v3/quota-sets.inc | 117 +++++------- .../v3/samples/quotas-delete-response.json | 0 .../quotas-show-defaults-response.json | 18 +- .../v3/samples/quotas-show-response.json | 18 +- .../v3/samples/quotas-update-request.json | 10 +- .../v3/samples/quotas-update-response.json | 17 +- .../quotas-user-show-detailed-response.json | 19 -- .../v3/samples/quotas-user-show-response.json | 7 - 9 files changed, 190 insertions(+), 189 deletions(-) delete mode 100644 api-ref/source/v3/samples/quotas-delete-response.json delete mode 100644 api-ref/source/v3/samples/quotas-user-show-detailed-response.json delete mode 100644 api-ref/source/v3/samples/quotas-user-show-response.json diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index e2cc90a9dae..fa5d09bb3e6 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -333,6 +333,13 @@ alias: in: body required: true 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: description: | The attach mode of attachment, read-only ('ro') or @@ -410,12 +417,24 @@ backup: in: body required: true type: object +backup_gigabytes: + description: | + The size(GB) of backups that are allowed for each project. + in: body + required: true + type: integer backups: description: | A list of ``backup`` objects. in: body required: true type: array +backups_number: + description: | + The number of backups that are allowed for each project. + in: body + required: true + type: integer bootable: description: | Enables or disables the bootable attribute. You @@ -519,13 +538,6 @@ control_location: in: body required: false type: string -cores: - description: | - The number of instance cores that are allowed for - each project. - in: body - required: true - type: integer created_at: description: | The date and time when the resource was created. @@ -768,21 +780,6 @@ fail_reason: in: body required: true type: string -fixed_ips: - description: | - The number of fixed IP addresses that are allowed - for each project. Must be equal to or greater than the number of - allowed instances. - in: body - required: true - type: integer -floating_ips: - description: | - The number of floating IP addresses that are - allowed for each project. - in: body - required: true - type: integer force: description: | Indicates whether to backup, even if the volume @@ -819,6 +816,19 @@ free_capacity: in: body required: true type: string +gigabytes: + description: | + The size(GB) of volumes and snapshots that are allowed for each project. + in: body + required: true + type: integer +gigabytes_for_type: + description: | + The size(GB) of volumes and snapshots that are allowed for each project + and the specifed volume type. + in: body + required: true + type: integer group_id_1: description: | The ID of the group. @@ -850,6 +860,12 @@ group_types: in: body required: true type: array +groups_number: + description: | + The number of groups that are allowed for each project. + in: body + required: true + type: integer guaranteed_until: description: | The expire time of the message, this message could be @@ -969,7 +985,7 @@ in_use: ``usage=true`` query parameter. in: body required: false - type: string + type: integer incremental: description: | The backup mode. A valid value is ``true`` for @@ -978,27 +994,6 @@ incremental: in: body required: false type: boolean -injected_file_content_bytes: - description: | - The number of bytes of content that are allowed - for each injected file. - in: body - required: true - type: integer -injected_file_path_bytes: - description: | - The number of bytes that are allowed for each - injected file path. - in: body - required: true - type: integer -injected_files: - description: | - The number of injected files that are allowed for - each project. - in: body - required: true - type: integer instance_uuid: description: | The UUID of the attaching instance. @@ -1011,13 +1006,6 @@ instance_uuid_1: in: body required: true type: string -instances: - description: | - The number of instances that are allowed for each - project. - in: body - required: true - type: integer is_incremental: description: | Indicates whether the backup mode is incremental. @@ -1045,13 +1033,6 @@ key: in: body required: true type: string -key_pairs: - description: | - The number of key pairs that are allowed for each - user. - in: body - required: true - type: integer key_size: description: | Size of encryption key, in bits. For example, 128 or 256. The default value @@ -1066,6 +1047,13 @@ keys: in: body required: true 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: description: | A list of ``limit`` objects. @@ -1234,13 +1222,6 @@ metadata_7: in: body required: false type: object -metadata_items: - description: | - The number of metadata items that are allowed for - each instance. - in: body - required: true - type: integer migration_policy: description: | Specify if the volume should be migrated when it is re-typed. @@ -1582,6 +1563,12 @@ os-volume_upload_image: in: body required: true type: object +per_volume_gigabytes: + description: | + The size(GB) of volumes that are allowed for each volume. + in: body + required: true + type: integer pool_name: description: | The name of the storage pool. @@ -1651,13 +1638,6 @@ quota_set: in: body required: true type: object -ram: - description: | - The amount of instance RAM in megabytes that are - allowed for each project. - in: body - required: true - type: integer rate: description: | Rate-limit volume copy bandwidth, used to @@ -1723,7 +1703,7 @@ request_id: type: string reserved: description: | - Reserved volume size. Visible only if you set the + Reserved data size. Visible only if you set the ``usage=true`` query parameter. in: body required: false @@ -1784,20 +1764,6 @@ safe_to_manage: in: body required: true type: boolean -security_group_rules: - description: | - The number of rules that are allowed for each - security group. - in: body - required: false - type: integer -security_groups: - description: | - The number of security groups that are allowed - for each project. - in: body - required: true - type: integer service_state: description: | The state of the service. One of ``available`` or ``unavailable``. @@ -1822,6 +1788,13 @@ size_1: in: body required: true type: integer +skip_validation: + description: | + If set to false, the quota value can't be set lower than the in_use quota. + Default is True. + in: body + required: false + type: boolean snapshot: description: | A partial representation of a snapshot used in @@ -1864,6 +1837,19 @@ snapshot_id_4: in: body required: true type: string +snapshots_number: + description: | + The number of snapshots that are allowed for each project. + in: body + required: true + type: integer +snapshots_number_for_type: + description: | + The number of snapshots that are allowed for each project and + the specified volume type. + in: body + required: true + type: integer source-name: description: | The resource's name. @@ -2282,3 +2268,16 @@ volumes: in: body required: true type: array +volumes_number: + description: | + The number of volumes that are allowed for each project. + in: body + required: true + type: integer +volumes_number_for_type: + description: | + The number of volumes that are allowed for each project and + the specified volume type. + in: body + required: true + type: integer diff --git a/api-ref/source/v3/quota-sets.inc b/api-ref/source/v3/quota-sets.inc index fedd885404f..700c751149a 100644 --- a/api-ref/source/v3/quota-sets.inc +++ b/api-ref/source/v3/quota-sets.inc @@ -35,23 +35,22 @@ Response Parameters .. rest_parameters:: parameters.yaml - - injected_file_content_bytes: injected_file_content_bytes - - metadata_items: metadata_items - - reserved: reserved - - in_use: in_use - - ram: ram - - floating_ips: floating_ips - - key_pairs: key_pairs - - injected_file_path_bytes: injected_file_path_bytes - - instances: instances - - security_group_rules: security_group_rules - - injected_files: injected_files - quota_set: quota_set - - cores: cores - - fixed_ips: fixed_ips - - id: id - - security_groups: security_groups - + - id: project_id + - volumes: volumes_number + - volumes_{volume_type}: volumes_number_for_type + - snapshots: snapshots_number + - snapshots_{volume_type}: snapshots_number_for_type + - backups: backups_number + - groups: groups_number + - per_volume_gigabytes: per_volume_gigabytes + - gigabytes: gigabytes + - gigabytes_{volume_type}: gigabytes_for_type + - backup_gigabytes: backup_gigabytes + - in_use: in_use + - reserved: reserved + - limit: limit_usage + - allocated: allocated Response Example ---------------- @@ -76,24 +75,20 @@ Request .. rest_parameters:: parameters.yaml - - injected_file_content_bytes: injected_file_content_bytes - - metadata_items: metadata_items - - reserved: reserved - - in_use: in_use - - ram: ram - - floating_ips: floating_ips - - key_pairs: key_pairs - - injected_file_path_bytes: injected_file_path_bytes - - instances: instances - - security_group_rules: security_group_rules - - injected_files: injected_files - - quota_set: quota_set - - cores: cores - - fixed_ips: fixed_ips - - id: id - - security_groups: security_groups - - project_id: quotas_project_id - admin_project_id: admin_project_id + - project_id: quotas_project_id + - quota_set: quota_set + - volumes: volumes_number + - volumes_{volume_type}: volumes_number_for_type + - snapshots: snapshots_number + - snapshots_{volume_type}: snapshots_number_for_type + - backups: backups_number + - groups: groups_number + - per_volume_gigabytes: per_volume_gigabytes + - gigabytes: gigabytes + - gigabytes_{volume_type}: gigabytes_for_type + - backup_gigabytes: backup_gigabytes + - skip_validation: skip_validation Request Example --------------- @@ -107,22 +102,17 @@ Response Parameters .. rest_parameters:: parameters.yaml - - injected_file_content_bytes: injected_file_content_bytes - - metadata_items: metadata_items - - reserved: reserved - - in_use: in_use - - ram: ram - - floating_ips: floating_ips - - key_pairs: key_pairs - - injected_file_path_bytes: injected_file_path_bytes - - instances: instances - - security_group_rules: security_group_rules - - injected_files: injected_files - quota_set: quota_set - - cores: cores - - fixed_ips: fixed_ips - - id: id - - security_groups: security_groups + - volumes: volumes_number + - volumes_{volume_type}: volumes_number_for_type + - snapshots: snapshots_number + - snapshots_{volume_type}: snapshots_number_for_type + - backups: backups_number + - groups: groups_number + - per_volume_gigabytes: per_volume_gigabytes + - gigabytes: gigabytes + - gigabytes_{volume_type}: gigabytes_for_type + - backup_gigabytes: backup_gigabytes Response Example ---------------- @@ -150,11 +140,7 @@ Request - project_id: quotas_project_id - admin_project_id: admin_project_id -Response Example ----------------- -.. literalinclude:: ./samples/quotas-delete-response.json - :language: javascript Get default quotas for a project @@ -183,23 +169,18 @@ Response Parameters .. rest_parameters:: parameters.yaml - - injected_file_content_bytes: injected_file_content_bytes - - metadata_items: metadata_items - - reserved: reserved - - in_use: in_use - - ram: ram - - floating_ips: floating_ips - - key_pairs: key_pairs - - injected_file_path_bytes: injected_file_path_bytes - - instances: instances - - security_group_rules: security_group_rules - - injected_files: injected_files - quota_set: quota_set - - cores: cores - - fixed_ips: fixed_ips - - id: id - - security_groups: security_groups - + - id: project_id + - volumes: volumes_number + - volumes_{volume_type}: volumes_number_for_type + - snapshots: snapshots_number + - snapshots_{volume_type}: snapshots_number_for_type + - backups: backups_number + - groups: groups_number + - per_volume_gigabytes: per_volume_gigabytes + - gigabytes: gigabytes + - gigabytes_{volume_type}: gigabytes_for_type + - backup_gigabytes: backup_gigabytes Response Example ---------------- diff --git a/api-ref/source/v3/samples/quotas-delete-response.json b/api-ref/source/v3/samples/quotas-delete-response.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/api-ref/source/v3/samples/quotas-show-defaults-response.json b/api-ref/source/v3/samples/quotas-show-defaults-response.json index 6c267112cea..adc54993ea4 100644 --- a/api-ref/source/v3/samples/quotas-show-defaults-response.json +++ b/api-ref/source/v3/samples/quotas-show-defaults-response.json @@ -1,7 +1,21 @@ { "quota_set": { - "gigabytes": 5, + "id": "a7090a26bc554d93aa845a4d41808251", + "volumes": 10, + "volumes_ceph": -1, + "volumes_lvm-thin": -1, + "volumes_lvmdriver-1": -1, "snapshots": 10, - "volumes": 20 + "snapshots_ceph": -1, + "snapshots_lvm-thin": -1, + "snapshots_lvmdriver-1": -1, + "backups": 10, + "groups": 10, + "per_volume_gigabytes": -1, + "gigabytes": 1000, + "gigabytes_ceph": -1, + "gigabytes_lvm-thin": -1, + "gigabytes_lvmdriver-1": -1, + "backup_gigabytes": 1000 } } diff --git a/api-ref/source/v3/samples/quotas-show-response.json b/api-ref/source/v3/samples/quotas-show-response.json index 6c267112cea..adc54993ea4 100644 --- a/api-ref/source/v3/samples/quotas-show-response.json +++ b/api-ref/source/v3/samples/quotas-show-response.json @@ -1,7 +1,21 @@ { "quota_set": { - "gigabytes": 5, + "id": "a7090a26bc554d93aa845a4d41808251", + "volumes": 10, + "volumes_ceph": -1, + "volumes_lvm-thin": -1, + "volumes_lvmdriver-1": -1, "snapshots": 10, - "volumes": 20 + "snapshots_ceph": -1, + "snapshots_lvm-thin": -1, + "snapshots_lvmdriver-1": -1, + "backups": 10, + "groups": 10, + "per_volume_gigabytes": -1, + "gigabytes": 1000, + "gigabytes_ceph": -1, + "gigabytes_lvm-thin": -1, + "gigabytes_lvmdriver-1": -1, + "backup_gigabytes": 1000 } } diff --git a/api-ref/source/v3/samples/quotas-update-request.json b/api-ref/source/v3/samples/quotas-update-request.json index 9ab32c11ca5..7f0234ab86f 100644 --- a/api-ref/source/v3/samples/quotas-update-request.json +++ b/api-ref/source/v3/samples/quotas-update-request.json @@ -1,5 +1,9 @@ { - "quota_set": { - "snapshots": 45 - } + "quota_set":{ + "groups": 11, + "volumes": 5, + "volumes_ceph": 3, + "backups": 4 + }, + "skip_validation": false } diff --git a/api-ref/source/v3/samples/quotas-update-response.json b/api-ref/source/v3/samples/quotas-update-response.json index 9ab32c11ca5..b239ec5d570 100644 --- a/api-ref/source/v3/samples/quotas-update-response.json +++ b/api-ref/source/v3/samples/quotas-update-response.json @@ -1,5 +1,20 @@ { "quota_set": { - "snapshots": 45 + "volumes": 10, + "volumes_ceph": -1, + "volumes_lvm-thin": -1, + "volumes_lvmdriver-1": -1, + "snapshots": 10, + "snapshots_ceph": -1, + "snapshots_lvm-thin": -1, + "snapshots_lvmdriver-1": -1, + "backups": 10, + "groups": 10, + "per_volume_gigabytes": -1, + "gigabytes": 1000, + "gigabytes_ceph": -1, + "gigabytes_lvm-thin": -1, + "gigabytes_lvmdriver-1": -1, + "backup_gigabytes": 1000 } } diff --git a/api-ref/source/v3/samples/quotas-user-show-detailed-response.json b/api-ref/source/v3/samples/quotas-user-show-detailed-response.json deleted file mode 100644 index 79609eb84a3..00000000000 --- a/api-ref/source/v3/samples/quotas-user-show-detailed-response.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "quota_set": { - "gigabytes": { - "in_use": 100, - "limit": -1, - "reserved": 0 - }, - "snapshots": { - "in_use": 12, - "limit": -1, - "reserved": 0 - }, - "volumes": { - "in_use": 1, - "limit": -1, - "reserved": 0 - } - } -} diff --git a/api-ref/source/v3/samples/quotas-user-show-response.json b/api-ref/source/v3/samples/quotas-user-show-response.json deleted file mode 100644 index 6c267112cea..00000000000 --- a/api-ref/source/v3/samples/quotas-user-show-response.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "quota_set": { - "gigabytes": 5, - "snapshots": 10, - "volumes": 20 - } -}