]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use base ISCSI driver to fulfill some driver requirements
authorMike Perez <thingee@gmail.com>
Mon, 15 Jul 2013 01:48:54 +0000 (18:48 -0700)
committerMike Perez <thingee@gmail.com>
Mon, 15 Jul 2013 02:20:57 +0000 (19:20 -0700)
Cinder has a list of minimum features that must be implemented by each
driver. This uses the copy_volume_to_image and copy_image_to_volume
implementation from the base ISCSI class. Also use the base for raising
NotImplementedError. This touches the Nexenta and Zadara driver.

Change-Id: I44a347e126a783e38d3a68cba23306a571aec43b

cinder/volume/drivers/nexenta/volume.py
cinder/volume/drivers/zadara.py

index ffefa2fa075a1e749200cd63983f5a8c0b3d248b..4bc3f68789baf165a6588e6645d9c156cf9b074f 100644 (file)
@@ -283,18 +283,6 @@ class NexentaDriver(driver.ISCSIDriver):  # pylint: disable=R0921
                        ' assuming it is already gone: %(exc)s'),
                      {'target': target_name, 'exc': exc})
 
-    def copy_image_to_volume(self, context, volume, image_service, image_id):
-        """Fetch the image from image_service and write it to the volume."""
-        raise NotImplementedError()
-
-    def copy_volume_to_image(self, context, volume, image_service, image_meta):
-        """Copy the volume to the specified image."""
-        raise NotImplementedError()
-
-    def create_cloned_volume(self, volume, src_vref):
-        """Creates a clone of the specified volume."""
-        raise NotImplementedError()
-
     def get_volume_stats(self, refresh=False):
         """Get volume status.
 
index 52a19235a6d76736417ecdba5808db50cea5a188..354a439bd4e403882d66a066f3c1e6b806afa8af 100644 (file)
@@ -469,24 +469,3 @@ class ZadaraVPSAISCSIDriver(driver.ISCSIDriver):
         self.vpsa.send_cmd('detach_volume',
                            vpsa_srv=vpsa_srv,
                            vpsa_vol=vpsa_vol)
-
-    def create_volume_from_snapshot(self, volume, snapshot):
-        raise NotImplementedError()
-
-    def create_snapshot(self, snapshot):
-        raise NotImplementedError()
-
-    def delete_snapshot(self, snapshot):
-        raise NotImplementedError()
-
-    def copy_image_to_volume(self, context, volume, image_service, image_id):
-        """Fetch the image from image_service and write it to the volume."""
-        raise NotImplementedError()
-
-    def copy_volume_to_image(self, context, volume, image_service, image_meta):
-        """Copy the volume to the specified image."""
-        raise NotImplementedError()
-
-    def create_cloned_volume(self, volume, src_vref):
-        """Creates a clone of the specified volume."""
-        raise NotImplementedError()