Merge "PowerMax Driver - Fix for group snapshot deletion"
This commit is contained in:
commit
45baee7bd5
@ -2791,11 +2791,13 @@ class PowerMaxCommonTest(test.TestCase):
|
||||
snapshots))
|
||||
self.assertEqual(ref_model_update, model_update)
|
||||
|
||||
def test_delete_group_snapshot_failed(self):
|
||||
group_snapshot = self.data.test_group_snapshot_failed
|
||||
@mock.patch.object(common.PowerMaxCommon, '_find_volume_group',
|
||||
return_value=None)
|
||||
def test_delete_group_snapshot_not_on_array(self, mock_gvg):
|
||||
group_snapshot = self.data.test_group_snapshot_1
|
||||
snapshots = []
|
||||
ref_model_update = (
|
||||
{'status': fields.GroupSnapshotStatus.ERROR_DELETING})
|
||||
{'status': fields.GroupSnapshotStatus.DELETED})
|
||||
with mock.patch.object(volume_utils, 'is_group_a_cg_snapshot_type',
|
||||
return_value=True):
|
||||
model_update, snapshots_model_update = (
|
||||
|
@ -6045,14 +6045,13 @@ class PowerMaxCommon(object):
|
||||
if volume_group and volume_group.get('name'):
|
||||
vol_grp_name = volume_group['name']
|
||||
if vol_grp_name is None:
|
||||
exception_message = (
|
||||
_("Cannot find generic volume group %(grp_id)s.") %
|
||||
{'group_id': source_group.id})
|
||||
raise exception.VolumeBackendAPIException(
|
||||
message=exception_message)
|
||||
|
||||
self.provision.delete_group_replica(
|
||||
array, snap_name, vol_grp_name)
|
||||
LOG.warning("Cannot find generic volume group %(grp_ss_id)s. "
|
||||
"on array %(array)s",
|
||||
{'grp_ss_id': group_snapshot.id,
|
||||
'array': array})
|
||||
else:
|
||||
self.provision.delete_group_replica(
|
||||
array, snap_name, vol_grp_name)
|
||||
|
||||
model_update = {'status': fields.GroupSnapshotStatus.DELETED}
|
||||
for snapshot in snapshots:
|
||||
|
Loading…
x
Reference in New Issue
Block a user