]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
VNX driver needs extra params for create cg from src
authorTina <tina.tang@emc.com>
Fri, 7 Aug 2015 04:33:03 +0000 (00:33 -0400)
committerTina <tina.tang@emc.com>
Tue, 11 Aug 2015 02:10:00 +0000 (22:10 -0400)
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
cinder/volume/drivers/emc/emc_cli_fc.py
cinder/volume/drivers/emc/emc_cli_iscsi.py

index 7b50c54ebd20e41543f5baa20b169464566660af..36532e8f49998144d1106c14b86dc0dec505c125 100644 (file)
@@ -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(
index 9853e6da43bf399935b34d2cc993e144b99a7fe7..03a03c63e00b49d7353b9c0db08ffb690453163b 100644 (file)
@@ -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,
index 507619623714407a9e7f43494f538d7cda47fd4c..bb83c947e455a8c13a11b80304b93456069079dc 100644 (file)
@@ -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,