]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix missing parameters in driver CG interface
authorXing Yang <xing.yang@emc.com>
Fri, 7 Aug 2015 18:11:58 +0000 (12:11 -0600)
committerXing Yang <xing.yang@emc.com>
Fri, 7 Aug 2015 18:15:02 +0000 (12:15 -0600)
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
cinder/tests/unit/test_pure.py
cinder/volume/drivers/emc/xtremio.py
cinder/volume/drivers/pure.py

index c8ca07e07f241520795e23210c46ee218d5ff25e..0b252ed7f5600a4dff9bb67b09aa576021811b8d 100644 (file)
@@ -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)
 
index dce80fe8de76af293235a6ee8c8bb107da37bdd8..886cca70422c4abca9cf55b553ff17bf6a04c1da 100644 (file)
@@ -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):
index 5f28eeedc987b7b010cedf51477f9d9a6cf70938..5c55e437d53ab33acce400aaad5d6a03be737738 100644 (file)
@@ -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.
index 7fa0f386b5da1d273f1ff9155b3cfdc75445a2c4..bfe8d7c6fca64b5e13d16e681f7e3bf7249ea0fc 100644 (file)
@@ -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)