Move ScaleIO driver to dell_emc folder

This patch creates a scaleio folder under dell_emc, and moves
ScaleIO driver to the dell_emc/scaleio folder. The scaleio
folder is created in preparation for more scaleio files to be
added in the future.

UpgradeImpact
DocImpact

Change-Id: I898ab34ee8c606e59bfe477da5167d110c277379
This commit is contained in:
xing-yang 2016-11-12 18:51:53 -05:00
parent 4a13a9139d
commit 3ff03ff05e
20 changed files with 45 additions and 35 deletions

View File

@ -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,

View File

@ -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):

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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(

View File

@ -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

View File

@ -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',
}

View File

@ -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.