diff options
author | gengjh <gengjh@cn.ibm.com> | 2013-04-01 22:11:50 +0800 |
---|---|---|
committer | gengjh <gengjh@cn.ibm.com> | 2013-06-13 15:36:08 +0800 |
commit | d5bbfad3d06e8801d70f4efce84c9504519efbc3 (patch) | |
tree | f06bbf29dea8206525bd388f0d05c36fb7916d3d /doc | |
parent | e0142d0f63bf64a07db3bd3b840fc2072d2e6ca3 (diff) | |
download | nova-d5bbfad3d06e8801d70f4efce84c9504519efbc3.tar.gz nova-d5bbfad3d06e8801d70f4efce84c9504519efbc3.tar.xz nova-d5bbfad3d06e8801d70f4efce84c9504519efbc3.zip |
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
Diffstat (limited to 'doc')
6 files changed, 47 insertions, 5 deletions
diff --git a/doc/api_samples/all_extensions/extensions-get-resp.json b/doc/api_samples/all_extensions/extensions-get-resp.json index b4323b097..ba23bad1e 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.json +++ b/doc/api_samples/all_extensions/extensions-get-resp.json @@ -426,11 +426,11 @@ }, { "alias": "os-extended-quotas", - "description": "Adds ability for admins to delete quota", + "description": "Adds ability for admins to delete quota and optionally force the update Quota command.", "links": [], "name": "ExtendedQuotas", - "namespace": "http://docs.openstack.org/compute/ext/quota-delete/api/v1.1", - "updated": "2013-05-23T00:00:00+00:00" + "namespace": "http://docs.openstack.org/compute/ext/extended_quotas/api/v1.1", + "updated": "2013-06-09T00:00:00+00:00" }, { "alias": "os-quota-sets", diff --git a/doc/api_samples/all_extensions/extensions-get-resp.xml b/doc/api_samples/all_extensions/extensions-get-resp.xml index 26361e719..64e24b9af 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.xml +++ b/doc/api_samples/all_extensions/extensions-get-resp.xml @@ -177,8 +177,8 @@ <extension alias="os-quota-class-sets" updated="2012-03-12T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/quota-classes-sets/api/v1.1" name="QuotaClasses"> <description>Quota classes management support.</description> </extension> - <extension alias="os-extended-quotas" updated="2013-05-23T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/quota-delete/api/v1.1" name="ExtendedQuotas"> - <description>Adds ability for admins to delete quota.</description> + <extension alias="os-extended-quotas" updated="2013-06-09T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/extended_quotas/api/v1.1" name="ExtendedQuotas"> + <description>Adds ability for admins to delete quota and optionally force the update Quota command.</description> </extension> <extension alias="os-quota-sets" updated="2011-08-08T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/quotas-sets/api/v1.1" name="Quotas"> <description>Quotas management support.</description> diff --git a/doc/api_samples/os-extended-quotas/quotas-update-post-req.json b/doc/api_samples/os-extended-quotas/quotas-update-post-req.json new file mode 100644 index 000000000..a58a17912 --- /dev/null +++ b/doc/api_samples/os-extended-quotas/quotas-update-post-req.json @@ -0,0 +1,6 @@ +{ + "quota_set": { + "force": "True", + "instances": 45 + } +} diff --git a/doc/api_samples/os-extended-quotas/quotas-update-post-req.xml b/doc/api_samples/os-extended-quotas/quotas-update-post-req.xml new file mode 100644 index 000000000..499b890f0 --- /dev/null +++ b/doc/api_samples/os-extended-quotas/quotas-update-post-req.xml @@ -0,0 +1,5 @@ +<?xml version='1.0' encoding='UTF-8'?> +<quota_set id="fake_tenant"> + <force>True</force> + <instances>45</instances> +</quota_set>
\ No newline at end of file diff --git a/doc/api_samples/os-extended-quotas/quotas-update-post-resp.json b/doc/api_samples/os-extended-quotas/quotas-update-post-resp.json new file mode 100644 index 000000000..d9024b77d --- /dev/null +++ b/doc/api_samples/os-extended-quotas/quotas-update-post-resp.json @@ -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 + } +} diff --git a/doc/api_samples/os-extended-quotas/quotas-update-post-resp.xml b/doc/api_samples/os-extended-quotas/quotas-update-post-resp.xml new file mode 100644 index 000000000..cd1b80ba0 --- /dev/null +++ b/doc/api_samples/os-extended-quotas/quotas-update-post-resp.xml @@ -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> |