From 22b00b0ae992d41baa092f27b54ebe5ade5b3314 Mon Sep 17 00:00:00 2001 From: Xing Yang Date: Fri, 7 Aug 2015 12:11:58 -0600 Subject: [PATCH] Fix missing parameters in driver CG interface 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 --- cinder/tests/unit/test_emc_xtremio.py | 2 +- cinder/tests/unit/test_pure.py | 8 ++++++-- cinder/volume/drivers/emc/xtremio.py | 3 ++- cinder/volume/drivers/pure.py | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cinder/tests/unit/test_emc_xtremio.py b/cinder/tests/unit/test_emc_xtremio.py index c8ca07e07..0b252ed7f 100644 --- a/cinder/tests/unit/test_emc_xtremio.py +++ b/cinder/tests/unit/test_emc_xtremio.py @@ -471,7 +471,7 @@ class EMCXIODriverISCSITestCase(test.TestCase): 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) diff --git a/cinder/tests/unit/test_pure.py b/cinder/tests/unit/test_pure.py index dce80fe8d..886cca704 100644 --- a/cinder/tests/unit/test_pure.py +++ b/cinder/tests/unit/test_pure.py @@ -664,7 +664,9 @@ class PureBaseVolumeDriverTestCase(PureDriverTestCase): 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) @@ -679,7 +681,9 @@ class PureBaseVolumeDriverTestCase(PureDriverTestCase): 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): diff --git a/cinder/volume/drivers/emc/xtremio.py b/cinder/volume/drivers/emc/xtremio.py index 5f28eeedc..5c55e437d 100644 --- a/cinder/volume/drivers/emc/xtremio.py +++ b/cinder/volume/drivers/emc/xtremio.py @@ -567,7 +567,8 @@ class XtremIOVolumeDriver(san.SanDriver): 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. diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 7fa0f386b..bfe8d7c6f 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -337,7 +337,8 @@ class PureBaseVolumeDriver(san.SanDriver): @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) -- 2.45.2