Fix 'force' parameter in os-quota-sets PUT schema
A regression was introduced in the 2.36 API microversion where the 'force' parameter was missing from the 'PUT /os-quota-sets/{tenant_id}' API request schema so users could not force quota updates with microversion 2.36 or later. The bug is now fixed so that the 'force' parameter can once again be specified during quota updates. There is no new microversion for this change since it is an admin-only API. Change-Id: I947e927802f755ccb25a91efd82cac895779d19e Closes-Bug: #1733886
This commit is contained in:
parent
76f8013f4b
commit
9ddbaa15cb
@ -1,20 +1,15 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10,
|
||||
"id": "fake_tenant",
|
||||
"networks": 3
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": {
|
||||
"in_use": 0,
|
||||
"limit": 20,
|
||||
"reserved": 0
|
||||
},
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": {
|
||||
"in_use": 0,
|
||||
"limit": 10240,
|
||||
"reserved": 0
|
||||
},
|
||||
"injected_file_path_bytes": {
|
||||
"in_use": 0,
|
||||
"limit": 255,
|
||||
"reserved": 0
|
||||
},
|
||||
"injected_files": {
|
||||
"in_use": 0,
|
||||
"limit": 5,
|
||||
"reserved": 0
|
||||
},
|
||||
"instances": {
|
||||
"in_use": 0,
|
||||
"limit": 10,
|
||||
"reserved": 0
|
||||
},
|
||||
"key_pairs": {
|
||||
"in_use": 0,
|
||||
"limit": 100,
|
||||
"reserved": 0
|
||||
},
|
||||
"metadata_items": {
|
||||
"in_use": 0,
|
||||
"limit": 128,
|
||||
"reserved": 0
|
||||
},
|
||||
"ram": {
|
||||
"in_use": 0,
|
||||
"limit": 51200,
|
||||
"reserved": 0
|
||||
},
|
||||
"server_group_members": {
|
||||
"in_use": 0,
|
||||
"limit": 10,
|
||||
"reserved": 0
|
||||
},
|
||||
"server_groups": {
|
||||
"in_use": 0,
|
||||
"limit": 10,
|
||||
"reserved": 0
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"instances": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 9
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 9,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -407,6 +407,12 @@ API endpoints as below::
|
||||
'/os-baremetal-nodes'
|
||||
'/os-fping'
|
||||
|
||||
.. note:: A `regression`_ was introduced in this microversion which broke the
|
||||
``force`` parameter in the ``PUT /os-quota-sets`` API. The fix will have
|
||||
to be applied to restore this functionality.
|
||||
|
||||
.. _regression: https://bugs.launchpad.net/nova/+bug/1733886
|
||||
|
||||
2.37
|
||||
----
|
||||
|
||||
|
@ -46,7 +46,7 @@ quota_resources = {
|
||||
update_quota_set = copy.deepcopy(quota_resources)
|
||||
update_quota_set.update({'force': parameter_types.boolean})
|
||||
|
||||
update_quota_set_v236 = copy.deepcopy(quota_resources)
|
||||
update_quota_set_v236 = copy.deepcopy(update_quota_set)
|
||||
del update_quota_set_v236['fixed_ips']
|
||||
del update_quota_set_v236['floating_ips']
|
||||
del update_quota_set_v236['security_groups']
|
||||
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": {
|
||||
"in_use": 0,
|
||||
"limit": 20,
|
||||
"reserved": 0
|
||||
},
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": {
|
||||
"in_use": 0,
|
||||
"limit": 10240,
|
||||
"reserved": 0
|
||||
},
|
||||
"injected_file_path_bytes": {
|
||||
"in_use": 0,
|
||||
"limit": 255,
|
||||
"reserved": 0
|
||||
},
|
||||
"injected_files": {
|
||||
"in_use": 0,
|
||||
"limit": 5,
|
||||
"reserved": 0
|
||||
},
|
||||
"instances": {
|
||||
"in_use": 0,
|
||||
"limit": 10,
|
||||
"reserved": 0
|
||||
},
|
||||
"key_pairs": {
|
||||
"in_use": 0,
|
||||
"limit": 100,
|
||||
"reserved": 0
|
||||
},
|
||||
"metadata_items": {
|
||||
"in_use": 0,
|
||||
"limit": 128,
|
||||
"reserved": 0
|
||||
},
|
||||
"ram": {
|
||||
"in_use": 0,
|
||||
"limit": 51200,
|
||||
"reserved": 0
|
||||
},
|
||||
"server_group_members": {
|
||||
"in_use": 0,
|
||||
"limit": 10,
|
||||
"reserved": 0
|
||||
},
|
||||
"server_groups": {
|
||||
"in_use": 0,
|
||||
"limit": 10,
|
||||
"reserved": 0
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"instances": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 9
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 9,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"server_groups": 10,
|
||||
"server_group_members": 10
|
||||
}
|
||||
}
|
@ -75,3 +75,8 @@ class QuotaSetsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):
|
||||
{})
|
||||
return self._verify_response('user-quotas-update-post-resp', {},
|
||||
response, 200)
|
||||
|
||||
|
||||
class QuotaSetsSampleJsonTests2_36(QuotaSetsSampleJsonTests):
|
||||
microversion = '2.36'
|
||||
scenarios = [('v2_36', {'api_major_version': 'v2.1'})]
|
||||
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
This release includes a fix for `bug 1733886`_ which was a regression
|
||||
introduced in the 2.36 API microversion where the ``force`` parameter was
|
||||
missing from the ``PUT /os-quota-sets/{tenant_id}`` API request schema so
|
||||
users could not force quota updates with microversion 2.36 or later. The
|
||||
bug is now fixed so that the ``force`` parameter can once again be
|
||||
specified during quota updates. There is no new microversion for this
|
||||
change since it is an admin-only API.
|
||||
|
||||
.. _bug 1733886: https://bugs.launchpad.net/nova/+bug/1733886
|
Loading…
Reference in New Issue
Block a user