summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorghanshyam <ghanshyammann@gmail.com>2017-07-06 08:58:48 +0300
committerGhanshyam Mann <ghanshyammann@gmail.com>2017-07-10 21:44:08 +0000
commit92e0efeefd6782f205dc6a2b1f8e8a97f146596d (patch)
tree93a604717934e4d6e5ef6b67afa7bbcdc7a0982d /api-ref
parente332797e4222012212ffd880a9ea5b94fa3e3446 (diff)
downloadnova-92e0efeefd6782f205dc6a2b1f8e8a97f146596d.tar.gz
Fix quota class set APIs
v2.1 API which does not return the 'server_groups' and 'server_group_members' quotas in GET & PUT os-quota-class-sets API response. v2 API used to return those keys in API response. Also filter out the network related quotas from os-quota-class-sets APIs Fixing this with microversion. Closes-Bug: #1701211 Closes-Bug: #1693168 implement-blueprint fix-quota-classes-api Change-Id: I66aeb7a92fb5ee906fead78030bd84a2e97916e8
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/os-quota-class-sets.inc24
-rw-r--r--api-ref/source/parameters.yaml11
2 files changed, 26 insertions, 9 deletions
diff --git a/api-ref/source/os-quota-class-sets.inc b/api-ref/source/os-quota-class-sets.inc
index 8588737d8d..97932e80b2 100644
--- a/api-ref/source/os-quota-class-sets.inc
+++ b/api-ref/source/os-quota-class-sets.inc
@@ -26,14 +26,18 @@ Nova supports implicit 'default' Quota Class only.
for more details.
.. warning::
- There is a bug in the v2.1 API and the legacy v2 compatible API which does
- not return the ``server_groups`` and ``server_group_members`` quotas in
+ There is a bug in the v2.1 API till microversion 2.49 and
+ the legacy v2 compatible API which does not return the
+ ``server_groups`` and ``server_group_members`` quotas in
GET and PUT ``os-quota-class-sets`` API response, whereas the v2 API
used to return those keys in the API response.
There is workaround to get the ``server_groups`` and
``server_group_members`` quotas using
:ref:`list-default-quotas-for-tenant`
API but that is per project quota.
+ This issue is fixed in microversion 2.50, here onwards
+ ``server_groups`` and ``server_group_members`` keys are
+ returned in API response body.
Show the quota for Quota Class
==============================
@@ -72,11 +76,13 @@ Response
- ram: ram_quota_class
- security_group_rules: security_group_rules_quota_class
- security_groups: security_groups_quota_class
+ - server_groups: server_groups_quota_class
+ - server_group_members: server_group_members_quota_class
- networks: networks_quota_optional
-**Example Show A Quota Class: JSON response**
+**Example Show A Quota Class: JSON response(2.50)**
-.. literalinclude:: ../../doc/api_samples/os-quota-class-sets/quota-classes-show-get-resp.json
+.. literalinclude:: ../../doc/api_samples/os-quota-class-sets/v2.50/quota-classes-show-get-resp.json
:language: javascript
Create or Update Quotas for Quota Class
@@ -117,9 +123,9 @@ Request
- server_group_members: server_group_members_quota_optional
- networks: networks_quota_optional
-**Example Update Quotas: JSON request**
+**Example Update Quotas: JSON request(2.50)**
-.. literalinclude:: ../../doc/api_samples/os-quota-class-sets/quota-classes-update-post-req.json
+.. literalinclude:: ../../doc/api_samples/os-quota-class-sets/v2.50/quota-classes-update-post-req.json
:language: javascript
Response
@@ -140,9 +146,11 @@ Response
- ram: ram_quota_class
- security_group_rules: security_group_rules_quota_class
- security_groups: security_groups_quota_class
+ - server_groups: server_groups_quota_class
+ - server_group_members: server_group_members_quota_class
- networks: networks_quota_optional
-**Example Update Quotas: JSON response**
+**Example Update Quotas: JSON response(2.50)**
-.. literalinclude:: ../../doc/api_samples/os-quota-class-sets/quota-classes-update-post-resp.json
+.. literalinclude:: ../../doc/api_samples/os-quota-class-sets/v2.50/quota-classes-update-post-resp.json
:language: javascript
diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml
index b24d49f466..07958d99dd 100644
--- a/api-ref/source/parameters.yaml
+++ b/api-ref/source/parameters.yaml
@@ -3813,6 +3813,7 @@ networks_quota_optional: &networks_quota_optional
in: body
required: false
type: integer
+ max_version: 2.50
networks_quota_set_optional:
<<: *networks_quota_optional
max_version: 2.35
@@ -4746,12 +4747,15 @@ server_group_id_body:
in: body
required: true
type: string
-server_group_members:
+server_group_members: &server_group_members
description: |
The number of allowed members for each server group.
in: body
required: true
type: integer
+server_group_members_quota_class:
+ <<: *server_group_members
+ min_version: 2.50
server_group_members_quota_details:
description: |
The object of detailed server group members, including in_use,
@@ -4777,6 +4781,11 @@ server_groups_list:
in: body
required: true
type: array
+server_groups_quota_class:
+ <<: *server_groups
+ description: |
+ The number of allowed server groups for the quota class.
+ min_version: 2.50
server_groups_quota_class_optional:
<<: *server_groups
description: |