From cc1f16e4c81694d33a755ea50d2630aad8e7e3a2 Mon Sep 17 00:00:00 2001 From: Mike Perez Date: Sun, 14 Jul 2013 18:48:54 -0700 Subject: [PATCH] Use base ISCSI driver to fulfill some driver requirements 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 | 12 ------------ cinder/volume/drivers/zadara.py | 21 --------------------- 2 files changed, 33 deletions(-) diff --git a/cinder/volume/drivers/nexenta/volume.py b/cinder/volume/drivers/nexenta/volume.py index ffefa2fa0..4bc3f6878 100644 --- a/cinder/volume/drivers/nexenta/volume.py +++ b/cinder/volume/drivers/nexenta/volume.py @@ -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. diff --git a/cinder/volume/drivers/zadara.py b/cinder/volume/drivers/zadara.py index 52a19235a..354a439bd 100644 --- a/cinder/volume/drivers/zadara.py +++ b/cinder/volume/drivers/zadara.py @@ -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() -- 2.45.2