]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Volume types need to be specified when creating CG
authorXing Yang <xing.yang@emc.com>
Sat, 6 Sep 2014 17:32:02 +0000 (13:32 -0400)
committerXing Yang <xing.yang@emc.com>
Sat, 13 Sep 2014 18:36:03 +0000 (14:36 -0400)
commit9082273305b0b9c117eb677a0e34c2ffde4e66f0
treee00274e41a353bce06d8293979c77bd8ff75d4d3
parent52df6822f6a64c80ff75a1fc37994afcc3ced885
Volume types need to be specified when creating CG

When creating a consistency group, the scheduler will find a backend that
supports all input volume types. If volume types are not provided, the
default_volume_type in cinder.conf will be used, however, this could cause
inconsistent behavior in a user environment where the default_volume_type
is defined in some places but not in others. This fix removed the use of
default_volume_type for CG creation, added a check to verify that volume
types are provided when creating a CG.

When creating a volume and adding it to a CG, we need to make sure a
volume type is provided as well.

Change-Id: I078d4fdd8d92529e853be16272ad74d1e130f712
Closes-Bug: #1366371
cinder/api/contrib/consistencygroups.py
cinder/consistencygroup/api.py
cinder/scheduler/manager.py
cinder/tests/api/contrib/test_consistencygroups.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/scheduler/test_scheduler.py
cinder/volume/api.py