Merge "Dell SC: create_cgsnapshot returning wrong structure"
This commit is contained in:
commit
092618aab8
@ -1835,7 +1835,8 @@ class DellSCSanISCSIDriverTestCase(test.TestCase):
|
||||
mock_open_connection,
|
||||
mock_init):
|
||||
mock_snapshot = mock.MagicMock()
|
||||
expected_snapshots = [mock_snapshot]
|
||||
mock_snapshot.id = '1'
|
||||
expected_snapshots = [{'id': '1', 'status': 'available'}]
|
||||
|
||||
context = {}
|
||||
cggrp = {'consistencygroup_id': 'fc8f2fec-fab2-4e34-9148-c094c913b9a3',
|
||||
|
@ -739,12 +739,16 @@ class DellCommonDriver(driver.ConsistencyGroupVD, driver.ManageableVD,
|
||||
if profile:
|
||||
LOG.debug('profile %s replayid %s', profile, snapshotid)
|
||||
if api.snap_cg_replay(profile, snapshotid, 0):
|
||||
snapshot_updates = []
|
||||
for snapshot in snapshots:
|
||||
snapshot.status = 'available'
|
||||
snapshot_updates.append({
|
||||
'id': snapshot.id,
|
||||
'status': 'available'
|
||||
})
|
||||
|
||||
model_update = {'status': 'available'}
|
||||
|
||||
return model_update, snapshots
|
||||
return model_update, snapshot_updates
|
||||
|
||||
# That didn't go well. Tell them why. Then bomb out.
|
||||
LOG.error(_LE('Failed to snap Consistency Group %s'), cgid)
|
||||
|
Loading…
Reference in New Issue
Block a user