Clone CG introduced new parameters in the driver CG interface
create_consistencygroup_from_src, but the drivers were not updated
to add the new parameters. This patch adds them for pure.py
and xtremio.py.
Related patch for the VNX driver:
https://review.openstack.org/210319
Change-Id: I5ab121e00179f17408226d470917d165d7e38ddd
Closes-Bug: #
1482733
xms_data['snapshot-sets'] = {snaps_name: snaps, 1: snaps}
self.assertRaises(exception.InvalidInput,
self.driver.create_consistencygroup_from_src,
- d.context, d.group, [])
+ d.context, d.group, [], None, None, None, None)
self.driver.delete_cgsnapshot(d.context, d.cgsnapshot)
self.driver.delete_consistencygroup(d.context, d.group)
mock_group,
mock_volumes,
cgsnapshot=mock_cgsnapshot,
- snapshots=mock_snapshots
+ snapshots=mock_snapshots,
+ source_cg=None,
+ source_vols=None
)
mock_create_cg.assert_called_with(mock_context, mock_group)
expected_calls = [mock.call(vol, snap)
mock_group,
mock_volumes,
cgsnapshot=mock_cgsnapshot,
- snapshots=mock_snapshots
+ snapshots=mock_snapshots,
+ source_cg=None,
+ source_vols=None
)
def test_create_consistencygroup_from_src_no_snap(self):
return model_update, volumes
def create_consistencygroup_from_src(self, context, group, volumes,
- cgsnapshot=None, snapshots=None):
+ cgsnapshot=None, snapshots=None,
+ source_cg=None, source_vols=None):
"""Creates a consistencygroup from source.
:param context: the context of the caller.
@log_debug_trace
def create_consistencygroup_from_src(self, context, group, volumes,
- cgsnapshot=None, snapshots=None):
+ cgsnapshot=None, snapshots=None,
+ source_cg=None, source_vols=None):
if cgsnapshot and snapshots:
self.create_consistencygroup(context, group)