Cinder currently doesn't check the existing resource
when user lowers the quota sets. It should have an optional
action that doesn't allow to update the quota of resources
lower than current usage.
This patch adds code to validate the update value of quota and
ensure the value can't be lower than existing resource.
APIImpact
Add an optional boolean argument 'skip_validation' with default value True.
{
"quota_set": {xxxx},
"skip_validation": 'True'/'False'
}
If skip_validation=False and the update value is lower than existing resource,
API will return 400 Bad Request.
Reviewed: https:/ /review. openstack. org/197938 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=b2abe32ed02 649dd2e21fbc945 e8863798419450
Committed: https:/
Submitter: Jenkins
Branch: master
commit b2abe32ed02649d d2e21fbc945e886 3798419450
Author: wanghao <email address hidden>
Date: Thu Jul 2 17:41:17 2015 +0800
Validate value when user update quota
Cinder currently doesn't check the existing resource
when user lowers the quota sets. It should have an optional
action that doesn't allow to update the quota of resources
lower than current usage.
This patch adds code to validate the update value of quota and
ensure the value can't be lower than existing resource.
APIImpact skip_validation ": 'True'/'False' =False and the update value is lower than existing resource,
Add an optional boolean argument 'skip_validation' with default value True.
{
"quota_set": {xxxx},
"
}
If skip_validation
API will return 400 Bad Request.
Change-Id: I24428ce53e5d10 e77235f372bb6d0 b70ea672412
Closes-Bug: #1304234