]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Prevent volume already in CG to be added to another
authorXing Yang <xing.yang@emc.com>
Wed, 12 Aug 2015 03:09:30 +0000 (23:09 -0400)
committerXing Yang <xing.yang@emc.com>
Wed, 12 Aug 2015 17:08:15 +0000 (13:08 -0400)
commitb9f7825ea6fc3f6ea213627631e7d64b655074bf
tree841f6b31d34ba4b9f487de422aec5a6e700efb4e
parentec9caa84207868bd5681123ef938515082495d24
Prevent volume already in CG to be added to another

If a volume is already in a CG, currently it can still be added to
another CG without any warning. We should add a check to see if the
volume is already in a CG and prevent it from being added to another
if that check returns True. It has to be removed from the previous
CG in order to be added to a new one.

Change-Id: I6ec92cbf4ce60e7afbfa5a57edef18ddba554a74
Closes-Bug: #1487151
cinder/consistencygroup/api.py
cinder/tests/unit/api/contrib/test_consistencygroups.py