Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance the validation of the quotas update
Need check whether the already used and reserved exceeds the new quota before update it. DocImpact Implements a validation to validate whether already used and reserved quota exceeds the new quota when run 'nova quota-update', it will throw error if the quota exceeds. This check will be ignored if admin want to force update when run 'nova quota-update' with additional option '--force'. This validation help admin to be aware of whether the quotas are oversold when they try to update quota and also provide an option '--force' to allow admin force update the quotas. Fix bug 1160749 Change-Id: Iba3cee0f0d92cf2e6d64bc83830b0091992d1ee9
- Loading branch information
gengjh
committed
Jun 13, 2013
1 parent
e0142d0
commit d5bbfad
Showing
16 changed files
with
267 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
doc/api_samples/os-extended-quotas/quotas-update-post-req.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"quota_set": { | ||
"force": "True", | ||
"instances": 45 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
doc/api_samples/os-extended-quotas/quotas-update-post-req.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<quota_set id="fake_tenant"> | ||
<force>True</force> | ||
<instances>45</instances> | ||
</quota_set> |
16 changes: 16 additions & 0 deletions
16
doc/api_samples/os-extended-quotas/quotas-update-post-resp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"quota_set": { | ||
"cores": 20, | ||
"fixed_ips": -1, | ||
"floating_ips": 10, | ||
"injected_file_content_bytes": 10240, | ||
"injected_file_path_bytes": 255, | ||
"injected_files": 5, | ||
"instances": 45, | ||
"key_pairs": 100, | ||
"metadata_items": 128, | ||
"ram": 51200, | ||
"security_group_rules": 20, | ||
"security_groups": 10 | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
doc/api_samples/os-extended-quotas/quotas-update-post-resp.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<quota_set> | ||
<cores>20</cores> | ||
<fixed_ips>-1</fixed_ips> | ||
<floating_ips>10</floating_ips> | ||
<injected_file_content_bytes>10240</injected_file_content_bytes> | ||
<injected_file_path_bytes>255</injected_file_path_bytes> | ||
<injected_files>5</injected_files> | ||
<instances>45</instances> | ||
<key_pairs>100</key_pairs> | ||
<metadata_items>128</metadata_items> | ||
<ram>51200</ram> | ||
<security_group_rules>20</security_group_rules> | ||
<security_groups>10</security_groups> | ||
</quota_set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
nova/tests/integrated/api_samples/os-extended-quotas/quotas-update-post-req.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"quota_set": { | ||
"force": "True", | ||
"instances": 45 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
nova/tests/integrated/api_samples/os-extended-quotas/quotas-update-post-req.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<quota_set id="fake_tenant"> | ||
<force>True</force> | ||
<instances>45</instances> | ||
</quota_set> |
Oops, something went wrong.