From dba4844ba59e929808b9b2b03627ba69d5c059e5 Mon Sep 17 00:00:00 2001 From: Tina Date: Fri, 7 Aug 2015 00:33:03 -0400 Subject: [PATCH] VNX driver needs extra params for create cg from src The cinder manager is passing 2 additional parameters (source_cg and source_vols) to create_consistencygroup_from_src of driver. VNX driver needs to add these 2 parameters. Change-Id: Ibf1ac8955238a27c82b32e1aa728f1efacd71273 Closes-Bug: #1482571 --- cinder/tests/unit/test_emc_vnxdirect.py | 8 +++++--- cinder/volume/drivers/emc/emc_cli_fc.py | 3 ++- cinder/volume/drivers/emc/emc_cli_iscsi.py | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cinder/tests/unit/test_emc_vnxdirect.py b/cinder/tests/unit/test_emc_vnxdirect.py index 7b50c54eb..36532e8f4 100644 --- a/cinder/tests/unit/test_emc_vnxdirect.py +++ b/cinder/tests/unit/test_emc_vnxdirect.py @@ -3655,7 +3655,8 @@ Time Remaining: 0 second(s) self.driver.create_consistencygroup_from_src( None, new_cg, [vol1_in_new_cg, vol2_in_new_cg], cgsnapshot=src_cgsnap, snapshots=[snap1_in_src_cgsnap, - snap2_in_src_cgsnap])) + snap2_in_src_cgsnap], + source_cg=None, source_vols=None)) self.assertEqual(2, len(volumes_model_update)) self.assertTrue('id^%s' % 6231 in volumes_model_update[0]['provider_location']) @@ -3725,7 +3726,7 @@ Time Remaining: 0 second(s) exception.InvalidInput, self.driver.create_consistencygroup_from_src, new_cg, [vol1_in_new_cg, vol2_in_new_cg], - None, None) + None, None, None, None) def test_create_cg_from_cgsnapshot_migrate_failed(self): new_cg = self.testData.test_cg.copy() @@ -3774,7 +3775,8 @@ Time Remaining: 0 second(s) None, new_cg, [vol1_in_new_cg, vol2_in_new_cg], cgsnapshot=src_cgsnap, snapshots=[snap1_in_src_cgsnap, - snap2_in_src_cgsnap]) + snap2_in_src_cgsnap], + source_cg=None, source_vols=None) expect_cmd = [ mock.call(*self.testData.LUN_DELETE_CMD( diff --git a/cinder/volume/drivers/emc/emc_cli_fc.py b/cinder/volume/drivers/emc/emc_cli_fc.py index 9853e6da4..03a03c63e 100644 --- a/cinder/volume/drivers/emc/emc_cli_fc.py +++ b/cinder/volume/drivers/emc/emc_cli_fc.py @@ -258,7 +258,8 @@ class EMCCLIFCDriver(driver.FibreChannelDriver): return self.cli.unmanage(volume) 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 consistency group from source.""" return self.cli.create_consistencygroup_from_src(context, group, diff --git a/cinder/volume/drivers/emc/emc_cli_iscsi.py b/cinder/volume/drivers/emc/emc_cli_iscsi.py index 507619623..bb83c947e 100644 --- a/cinder/volume/drivers/emc/emc_cli_iscsi.py +++ b/cinder/volume/drivers/emc/emc_cli_iscsi.py @@ -237,7 +237,8 @@ class EMCCLIISCSIDriver(driver.ISCSIDriver): self.cli.unmanage(volume) 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 consistency group from source.""" return self.cli.create_consistencygroup_from_src(context, group, -- 2.45.2