]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix Qos Specs association corner case
authorZhiteng Huang <zhithuang@ebaysf.com>
Mon, 9 Sep 2013 06:53:37 +0000 (14:53 +0800)
committerZhiteng Huang <zhithuang@ebaysf.com>
Tue, 10 Sep 2013 01:56:44 +0000 (09:56 +0800)
commit5aa6ca2e80631a32e429bcacbd031ddaa6e5bfb1
treec7c92489996f9b65e587121e30f35604ff3f1d61
parent83cb5b1cfc62c6b5567d738d9cdf12435d20745f
Fix Qos Specs association corner case

Fix a corner case in associating QoS Specs with Volumt types that was
not handled well: Raise HTTPBadRequest() to client if associate volume
type, which is already associated one qos specs other than specified
qos specs.  Previously such operation will proceed without error which
results overwriting original association.

Also refactor DB API volume_type_qos_specs_get() to return qos specs
in consistent dict format as other qos specs related APIs.

Fix bug: # 1222692

Change-Id: I9db66d1e3a7469620ba542f5387422685a2d828f
cinder/api/contrib/qos_specs_manage.py
cinder/db/sqlalchemy/api.py
cinder/tests/test_qos_specs.py
cinder/tests/test_volume_types.py
cinder/volume/qos_specs.py