]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Validate maximum limit for quota
authorliyingjun <yingjun.li@kylin-cloud.com>
Mon, 29 Jun 2015 01:49:34 +0000 (09:49 +0800)
committerliyingjun <yingjun.li@kylin-cloud.com>
Thu, 2 Jul 2015 01:07:12 +0000 (09:07 +0800)
commit349ed36a7b560a30e86750674ede77dc987674a0
tree0c8a8e590cf31defaf3b18c2b6f0a51a972c579e
parent18563cb928c2e2308aa3f57d80dfe332bbe3cc12
Validate maximum limit for quota

Currently, when updating quota using limit larger than 0x7FFFFFFF,
there will be a DBError. The maximum limit needs to be validated.
And the maximum value is defined by SQL integer type INT, which
is a general value:
http://dev.mysql.com/doc/refman/5.0/en/integer-types.html
http://www.postgresql.org/docs/9.1/static/datatype-numeric.html

Change-Id: I3b4bd3badb84224bd8196c4fdd523c68310809de
Closes-bug: #1433052
cinder/api/contrib/quotas.py
cinder/db/api.py
cinder/tests/unit/api/contrib/test_quotas.py