]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Update quota when volume type renames
authorLisaLi <xiaoyan.li@intel.com>
Fri, 15 Jan 2016 08:12:45 +0000 (16:12 +0800)
committerLisaLi <xiaoyan.li@intel.com>
Mon, 15 Feb 2016 03:22:21 +0000 (11:22 +0800)
commitb1a322cf8fbf97a48f8fff07f70d2d32c83c9ea6
tree58a9368c853fd0a0f81b252995f8756b8c60fd98
parent221aaaf001649fec2d702c62dac4396eda619a17
Update quota when volume type renames

When customers rename volume type, the corresponding quota_usages
should be changed. Or else quota_usage shows incorrect data.

Meanwhile, it deletes quota_usages whose corresponding volume
types don't exist. These invalid data are left when renaming
volume types in old versions.

Closes-bug: #1473183

Change-Id: I9071821f8c1a95fccef214868e5cea026fed9657
Co-Authored-By: wanghao <wanghao749@huawei.com>
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/quota.py
cinder/tests/unit/api/contrib/test_types_manage.py
cinder/tests/unit/test_db_api.py
cinder/tests/unit/test_quota.py
cinder/tests/unit/test_volume_types.py
cinder/volume/volume_types.py