diff --git a/cinder/opts.py b/cinder/opts.py index 93fbc98b5a8..5b14d030eed 100644 --- a/cinder/opts.py +++ b/cinder/opts.py @@ -74,6 +74,8 @@ from cinder.volume.drivers.coprhd import scaleio as \ from cinder.volume.drivers import datera as cinder_volume_drivers_datera from cinder.volume.drivers.dell import dell_storagecenter_common as \ cinder_volume_drivers_dell_dellstoragecentercommon +from cinder.volume.drivers.dell_emc.scaleio import driver as \ + cinder_volume_drivers_dell_emc_scaleio_driver from cinder.volume.drivers.dell_emc.unity import driver as \ cinder_volume_drivers_dell_emc_unity_driver from cinder.volume.drivers.disco import disco as \ @@ -84,8 +86,6 @@ from cinder.volume.drivers import drbdmanagedrv as \ cinder_volume_drivers_drbdmanagedrv from cinder.volume.drivers.emc import emc_vmax_common as \ cinder_volume_drivers_emc_emcvmaxcommon -from cinder.volume.drivers.emc import scaleio as \ - cinder_volume_drivers_emc_scaleio from cinder.volume.drivers.emc.vnx import common as \ cinder_volume_drivers_emc_vnx_common from cinder.volume.drivers.emc import xtremio as \ @@ -275,13 +275,13 @@ def list_opts(): cinder_volume_drivers_datera.d_opts, cinder_volume_drivers_dell_dellstoragecentercommon. common_opts, + cinder_volume_drivers_dell_emc_scaleio_driver.scaleio_opts, cinder_volume_drivers_dell_emc_unity_driver.UNITY_OPTS, cinder_volume_drivers_disco_disco.disco_opts, cinder_volume_drivers_dothill_dothillcommon.common_opts, cinder_volume_drivers_dothill_dothillcommon.iscsi_opts, cinder_volume_drivers_drbdmanagedrv.drbd_opts, cinder_volume_drivers_emc_emcvmaxcommon.emc_opts, - cinder_volume_drivers_emc_scaleio.scaleio_opts, cinder_volume_drivers_emc_vnx_common.EMC_VNX_OPTS, cinder_volume_drivers_emc_xtremio.XTREMIO_OPTS, cinder_volume_drivers_eqlx.eqlx_opts, diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/__init__.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/__init__.py similarity index 98% rename from cinder/tests/unit/volume/drivers/emc/scaleio/__init__.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/__init__.py index 33e31bbd60e..c5c035fe17a 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/__init__.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/__init__.py @@ -17,7 +17,7 @@ import requests import six from cinder import test -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class CustomResponseMode(object): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/mocks.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/mocks.py similarity index 96% rename from cinder/tests/unit/volume/drivers/emc/scaleio/mocks.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/mocks.py index 4dee67db121..0361f44e130 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/mocks.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/mocks.py @@ -17,11 +17,11 @@ import requests import six from cinder.volume import configuration as conf -from cinder.volume.drivers.emc import scaleio +from cinder.volume.drivers.dell_emc.scaleio import driver from oslo_config import cfg -class ScaleIODriver(scaleio.ScaleIODriver): +class ScaleIODriver(driver.ScaleIODriver): """Mock ScaleIO Driver class. Provides some fake configuration options diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_attach_detach_volume.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_attach_detach_volume.py similarity index 96% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_attach_detach_volume.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_attach_detach_volume.py index 20329c8ba85..0cb158ac63e 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_attach_detach_volume.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_attach_detach_volume.py @@ -16,7 +16,7 @@ from cinder import context from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc import scaleio class TestAttachDetachVolume(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_consistencygroups.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_consistencygroups.py similarity index 98% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_consistencygroups.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_consistencygroups.py index 44179369b68..fe0e7ecc1ed 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_consistencygroups.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_consistencygroups.py @@ -22,8 +22,8 @@ from cinder.tests.unit.consistencygroup import fake_consistencygroup from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_snapshot from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class TestConsistencyGroups(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_cloned_volume.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_cloned_volume.py similarity index 96% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_create_cloned_volume.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_cloned_volume.py index 6dda472a940..4edad7ffd43 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_cloned_volume.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_cloned_volume.py @@ -21,8 +21,8 @@ from cinder import context from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class TestCreateClonedVolume(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_snapshot.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_snapshot.py similarity index 97% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_create_snapshot.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_snapshot.py index 3ddab35651a..816b89a21ec 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_snapshot.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_snapshot.py @@ -22,8 +22,8 @@ from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_snapshot from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class TestCreateSnapShot(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_volume.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_volume.py similarity index 98% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_create_volume.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_volume.py index e60d64f3892..23ff37c6465 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_volume.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_volume.py @@ -19,7 +19,7 @@ import mock from cinder import context from cinder import exception from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc import scaleio @ddt.ddt diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_volume_from_snapshot.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_volume_from_snapshot.py similarity index 96% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_create_volume_from_snapshot.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_volume_from_snapshot.py index 2b135e96826..9623b2ca03d 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_create_volume_from_snapshot.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_create_volume_from_snapshot.py @@ -20,8 +20,8 @@ from cinder import context from cinder import exception from cinder.tests.unit import fake_snapshot from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class TestCreateVolumeFromSnapShot(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_delete_snapshot.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_snapshot.py similarity index 96% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_delete_snapshot.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_snapshot.py index 3048799c544..7a1f8ce3473 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_delete_snapshot.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_snapshot.py @@ -18,8 +18,8 @@ from cinder import context from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit.fake_snapshot import fake_snapshot_obj -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class TestDeleteSnapShot(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_delete_volume.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_volume.py similarity index 96% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_delete_volume.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_volume.py index 86ca3287dbc..a3a4d983edf 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_delete_volume.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_volume.py @@ -18,8 +18,8 @@ from cinder import context from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class TestDeleteVolume(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_extend_volume.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_extend_volume.py similarity index 97% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_extend_volume.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_extend_volume.py index bfff4e1abda..76ddef94829 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_extend_volume.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_extend_volume.py @@ -18,8 +18,8 @@ from cinder import context from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit.fake_volume import fake_volume_obj -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks class TestExtendVolume(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_initialize_connection.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_initialize_connection.py similarity index 98% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_initialize_connection.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_initialize_connection.py index a23e3872ee4..4cf97fb6300 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_initialize_connection.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_initialize_connection.py @@ -17,7 +17,7 @@ import mock from cinder import context from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc import scaleio class TestInitializeConnection(scaleio.TestScaleIODriver): diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_manage_existing.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_manage_existing.py similarity index 97% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_manage_existing.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_manage_existing.py index 6db5f28fb48..4a693e89cf5 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_manage_existing.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_manage_existing.py @@ -17,8 +17,8 @@ from cinder import context from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks from cinder.volume import volume_types from mock import patch from six.moves import urllib diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_manage_existing_snapshot.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_manage_existing_snapshot.py similarity index 98% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_manage_existing_snapshot.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_manage_existing_snapshot.py index bde22004974..e3e65ded8af 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_manage_existing_snapshot.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_manage_existing_snapshot.py @@ -19,8 +19,8 @@ from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_snapshot from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks from cinder.volume import volume_types diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/test_misc.py b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_misc.py similarity index 95% rename from cinder/tests/unit/volume/drivers/emc/scaleio/test_misc.py rename to cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_misc.py index bee4ca7938c..6314ce64903 100644 --- a/cinder/tests/unit/volume/drivers/emc/scaleio/test_misc.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_misc.py @@ -21,8 +21,8 @@ from cinder import context from cinder import exception from cinder.tests.unit import fake_constants as fake from cinder.tests.unit import fake_volume -from cinder.tests.unit.volume.drivers.emc import scaleio -from cinder.tests.unit.volume.drivers.emc.scaleio import mocks +from cinder.tests.unit.volume.drivers.dell_emc import scaleio +from cinder.tests.unit.volume.drivers.dell_emc.scaleio import mocks @ddt.ddt @@ -154,7 +154,8 @@ class TestMisc(scaleio.TestScaleIODriver): self.driver.get_volume_stats(True) @mock.patch( - 'cinder.volume.drivers.emc.scaleio.ScaleIODriver._rename_volume', + 'cinder.volume.drivers.dell_emc.scaleio.driver.ScaleIODriver.' + '_rename_volume', return_value=None) def test_update_migrated_volume(self, mock_rename): test_vol = self.driver.update_migrated_volume( @@ -164,7 +165,8 @@ class TestMisc(scaleio.TestScaleIODriver): test_vol) @mock.patch( - 'cinder.volume.drivers.emc.scaleio.ScaleIODriver._rename_volume', + 'cinder.volume.drivers.dell_emc.scaleio.driver.ScaleIODriver.' + '_rename_volume', return_value=None) def test_update_unavailable_migrated_volume(self, mock_rename): test_vol = self.driver.update_migrated_volume( @@ -175,7 +177,8 @@ class TestMisc(scaleio.TestScaleIODriver): test_vol) @mock.patch( - 'cinder.volume.drivers.emc.scaleio.ScaleIODriver._rename_volume', + 'cinder.volume.drivers.dell_emc.scaleio.driver.ScaleIODriver.' + '_rename_volume', side_effect=exception.VolumeBackendAPIException(data='Error!')) def test_fail_update_migrated_volume(self, mock_rename): self.assertRaises( diff --git a/cinder/volume/drivers/dell_emc/scaleio/__init__.py b/cinder/volume/drivers/dell_emc/scaleio/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cinder/volume/drivers/emc/scaleio.py b/cinder/volume/drivers/dell_emc/scaleio/driver.py similarity index 99% rename from cinder/volume/drivers/emc/scaleio.py rename to cinder/volume/drivers/dell_emc/scaleio/driver.py index 68224ffea64..805fb6e4376 100644 --- a/cinder/volume/drivers/emc/scaleio.py +++ b/cinder/volume/drivers/dell_emc/scaleio/driver.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. """ -Driver for EMC ScaleIO based on ScaleIO remote CLI. +Driver for Dell EMC ScaleIO based on ScaleIO remote CLI. """ import base64 @@ -109,7 +109,7 @@ SIO_MAX_OVERSUBSCRIPTION_RATIO = 10.0 @interface.volumedriver class ScaleIODriver(driver.VolumeDriver): - """EMC ScaleIO Driver.""" + """Dell EMC ScaleIO Driver.""" VERSION = "2.0" @@ -826,7 +826,7 @@ class ScaleIODriver(driver.VolumeDriver): backend_name = self.configuration.safe_get('volume_backend_name') stats['volume_backend_name'] = backend_name or 'scaleio' - stats['vendor_name'] = 'EMC' + stats['vendor_name'] = 'Dell EMC' stats['driver_version'] = self.VERSION stats['storage_protocol'] = 'scaleio' stats['reserved_percentage'] = 0 diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index f70c03f73b9..9c184438c08 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -149,6 +149,8 @@ MAPPING = { 'cinder.volume.drivers.hitachi.hnas_iscsi.HNASISCSIDriver', 'cinder.volume.drivers.ibm.xiv_ds8k': 'cinder.volume.drivers.ibm.ibm_storage', + 'cinder.volume.drivers.emc.scaleio': + 'cinder.volume.drivers.dell_emc.scaleio.driver', } diff --git a/releasenotes/notes/move-scaleio-driver-to-dell-emc-dir-c195374ca6b7e98d.yaml b/releasenotes/notes/move-scaleio-driver-to-dell-emc-dir-c195374ca6b7e98d.yaml new file mode 100644 index 00000000000..4311d23be49 --- /dev/null +++ b/releasenotes/notes/move-scaleio-driver-to-dell-emc-dir-c195374ca6b7e98d.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - The ScaleIO driver is moved to the dell_emc directory. + volume_driver entry in cinder.conf needs to be changed to + cinder.volume.drivers.dell_emc.scaleio.driver.ScaleIODriver.