deb-cinder/cinder/consistencygroup
Accela Zhao 8260169fa7 Don't create cgsnapshot if cg is empty
If we create cgsnapshot from an empty consistencygroup, it fails
with "Consistency group is empty. No cgsnapshot will be created".
However, a cgsnapshot object is still created in DB.

This is because in cinder/consistencygroup/api.py::_create_cgsnapshot,
we create cgsnapshot object before we test whether the corresponding
consistencygroup is empy.

This patch fixes this problem by moving the creation of cgsnapshot
object to after the test of whether consistencygroup is empty.

Change-Id: I09500ab1cf19b28591668a3fed6834d1a73ad176
Closes-Bug: #1535979
2016-02-03 14:16:30 -08:00
..
__init__.py Move oslo.utils to oslo_utils namespace 2015-01-19 21:50:34 -06:00
api.py Don't create cgsnapshot if cg is empty 2016-02-03 14:16:30 -08:00