Move VNX driver to dell_emc folder

This path moves VNX driver files to dell_emc folder

UpgradeImpact
DocImpact
Change-Id: Ibf58d3a58d9f5ad86593132f3a4763097e6d5cca
This commit is contained in:
Peter Wang 2016-12-01 05:35:41 -05:00
parent b3e96a58f0
commit c479e94901
27 changed files with 114 additions and 99 deletions

View File

@ -78,6 +78,8 @@ 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.dell_emc.vnx import common as \
cinder_volume_drivers_dell_emc_vnx_common
from cinder.volume.drivers.disco import disco as \
cinder_volume_drivers_disco_disco
from cinder.volume.drivers.dothill import dothill_common as \
@ -86,8 +88,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.vnx import common as \
cinder_volume_drivers_emc_vnx_common
from cinder.volume.drivers.emc import xtremio as \
cinder_volume_drivers_emc_xtremio
from cinder.volume.drivers import eqlx as cinder_volume_drivers_eqlx
@ -276,12 +276,12 @@ def list_opts():
common_opts,
cinder_volume_drivers_dell_emc_scaleio_driver.scaleio_opts,
cinder_volume_drivers_dell_emc_unity_driver.UNITY_OPTS,
cinder_volume_drivers_dell_emc_vnx_common.VNX_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_vnx_common.EMC_VNX_OPTS,
cinder_volume_drivers_emc_xtremio.XTREMIO_OPTS,
cinder_volume_drivers_eqlx.eqlx_opts,
cinder_volume_drivers_falconstor_fsscommon.FSS_OPTS,

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -17,11 +17,10 @@ import sys
import mock
from cinder.tests.unit.volume.drivers.emc.vnx import fake_exception
from cinder.tests.unit.volume.drivers.emc.vnx import fake_storops
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_exception
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_storops
fake_vnx = mock.Mock()
fake_storops.exception = fake_exception
fake_storops.vnx = fake_vnx
sys.modules['storops'] = fake_storops
sys.modules['storops.vnx'] = fake_vnx

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from cinder.tests.unit.volume.drivers.emc.vnx import fake_enum
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_enum
class VNXSystem(object):

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -21,14 +21,16 @@ from cinder.tests.unit.consistencygroup import fake_consistencygroup
from cinder.tests.unit import fake_constants
from cinder.tests.unit import fake_snapshot
from cinder.tests.unit import fake_volume
from cinder.tests.unit.volume.drivers.emc.vnx import fake_exception as lib_ex
from cinder.tests.unit.volume.drivers.emc.vnx import fake_storops as storops
from cinder.tests.unit.volume.drivers.emc.vnx import utils
from cinder.volume.drivers.emc.vnx import adapter
from cinder.volume.drivers.emc.vnx import client
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.emc.vnx import driver
from cinder.volume.drivers.emc.vnx import utils as vnx_utils
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_exception as \
lib_ex
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_storops as \
storops
from cinder.tests.unit.volume.drivers.dell_emc.vnx import utils
from cinder.volume.drivers.dell_emc.vnx import adapter
from cinder.volume.drivers.dell_emc.vnx import client
from cinder.volume.drivers.dell_emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import driver
from cinder.volume.drivers.dell_emc.vnx import utils as vnx_utils
SYMBOL_TYPE = '_type'
SYMBOL_PROPERTIES = '_properties'
@ -405,7 +407,7 @@ def _patch_adapter_prop(adapter, client):
adapter.serial_number = client.get_serial()
except KeyError:
adapter.serial_number = 'faked_serial_number'
adapter.VERSION = driver.EMCVNXDriver.VERSION
adapter.VERSION = driver.VNXDriver.VERSION
def patch_adapter(protocol):

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -18,16 +18,17 @@ import re
from cinder import exception
from cinder.objects import fields
from cinder import test
from cinder.tests.unit.volume.drivers.emc.vnx import fake_exception \
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_exception \
as storops_ex
from cinder.tests.unit.volume.drivers.emc.vnx import fake_storops as storops
from cinder.tests.unit.volume.drivers.emc.vnx import res_mock
from cinder.tests.unit.volume.drivers.emc.vnx import utils
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_storops \
as storops
from cinder.tests.unit.volume.drivers.dell_emc.vnx import res_mock
from cinder.tests.unit.volume.drivers.dell_emc.vnx import utils
from cinder.volume import configuration as conf
from cinder.volume.drivers.emc.vnx import adapter
from cinder.volume.drivers.emc.vnx import client
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.emc.vnx import utils as vnx_utils
from cinder.volume.drivers.dell_emc.vnx import adapter
from cinder.volume.drivers.dell_emc.vnx import client
from cinder.volume.drivers.dell_emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import utils as vnx_utils
class TestCommonAdapter(test.TestCase):

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -17,13 +17,14 @@ import unittest
from cinder import exception
from cinder import test
from cinder.tests.unit.volume.drivers.emc.vnx import fake_exception \
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_exception \
as storops_ex
from cinder.tests.unit.volume.drivers.emc.vnx import fake_storops as storops
from cinder.tests.unit.volume.drivers.emc.vnx import res_mock
from cinder.tests.unit.volume.drivers.emc.vnx import utils
from cinder.volume.drivers.emc.vnx import client as vnx_client
from cinder.volume.drivers.emc.vnx import common as vnx_common
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_storops \
as storops
from cinder.tests.unit.volume.drivers.dell_emc.vnx import res_mock
from cinder.tests.unit.volume.drivers.dell_emc.vnx import utils
from cinder.volume.drivers.dell_emc.vnx import client as vnx_client
from cinder.volume.drivers.dell_emc.vnx import common as vnx_common
class TestCondition(test.TestCase):

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -17,10 +17,11 @@ import mock
from cinder import exception
from cinder import test
from cinder.tests.unit.volume.drivers.emc.vnx import fake_storops as storops
from cinder.tests.unit.volume.drivers.emc.vnx import res_mock
from cinder.volume.drivers.emc.vnx import client
from cinder.volume.drivers.emc.vnx import common
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_storops \
as storops
from cinder.tests.unit.volume.drivers.dell_emc.vnx import res_mock
from cinder.volume.drivers.dell_emc.vnx import client
from cinder.volume.drivers.dell_emc.vnx import common
class TestExtraSpecs(test.TestCase):

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -17,19 +17,19 @@ import mock
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.emc.vnx import driver
from cinder.volume.drivers.dell_emc.vnx import driver
class TestEMCVNXDriver(test.TestCase):
class TestVNXDriver(test.TestCase):
def setUp(self):
super(TestEMCVNXDriver, self).setUp()
super(TestVNXDriver, self).setUp()
self.configuration = conf.Configuration(None)
self.fc_adapter_patcher = mock.patch(
'cinder.volume.drivers.emc.vnx.adapter.FCAdapter',
'cinder.volume.drivers.dell_emc.vnx.adapter.FCAdapter',
autospec=True)
self.fc_adapter_patcher.start()
self.iscsi_adapter_patcher = mock.patch(
'cinder.volume.drivers.emc.vnx.adapter.ISCSIAdapter',
'cinder.volume.drivers.dell_emc.vnx.adapter.ISCSIAdapter',
autospec=True)
self.iscsi_adapter_patcher.start()
self.driver = None
@ -38,8 +38,8 @@ class TestEMCVNXDriver(test.TestCase):
def _get_driver(self, protocol):
self.configuration.storage_protocol = protocol
drv = driver.EMCVNXDriver(configuration=self.configuration,
active_backend_id=None)
drv = driver.VNXDriver(configuration=self.configuration,
active_backend_id=None)
drv.do_setup(None)
return drv
@ -47,13 +47,13 @@ class TestEMCVNXDriver(test.TestCase):
_driver = self._get_driver('iscsi')
driver_name = str(_driver.adapter)
self.assertIn('ISCSIAdapter', driver_name)
self.assertEqual(driver.EMCVNXDriver.VERSION, _driver.VERSION)
self.assertEqual(driver.VNXDriver.VERSION, _driver.VERSION)
def test_init_fc_driver(self):
_driver = self._get_driver('FC')
driver_name = str(_driver.adapter)
self.assertIn('FCAdapter', driver_name)
self.assertEqual(driver.EMCVNXDriver.VERSION, _driver.VERSION)
self.assertEqual(driver.VNXDriver.VERSION, _driver.VERSION)
def test_create_volume(self):
_driver = self._get_driver('iscsi')

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -14,9 +14,9 @@
# under the License.
from cinder import test
from cinder.tests.unit.volume.drivers.emc.vnx import res_mock
from cinder.tests.unit.volume.drivers.dell_emc.vnx import res_mock
from cinder.volume import configuration as conf
from cinder.volume.drivers.emc.vnx import utils
from cinder.volume.drivers.dell_emc.vnx import utils
class TestResMock(test.TestCase):

View File

@ -18,9 +18,10 @@ from taskflow.patterns import linear_flow
from taskflow.types import failure
from cinder import test
from cinder.tests.unit.volume.drivers.emc.vnx import fake_exception as vnx_ex
from cinder.tests.unit.volume.drivers.emc.vnx import res_mock
import cinder.volume.drivers.emc.vnx.taskflows as vnx_taskflow
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_exception \
as vnx_ex
from cinder.tests.unit.volume.drivers.dell_emc.vnx import res_mock
import cinder.volume.drivers.dell_emc.vnx.taskflows as vnx_taskflow
class TestTaskflow(test.TestCase):

View File

@ -17,13 +17,14 @@ import mock
from cinder import exception
from cinder import test
from cinder.tests.unit.volume.drivers.emc.vnx import fake_exception \
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_exception \
as storops_ex
from cinder.tests.unit.volume.drivers.emc.vnx import fake_storops as storops
from cinder.tests.unit.volume.drivers.emc.vnx import res_mock
from cinder.tests.unit.volume.drivers.emc.vnx import utils as ut_utils
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.emc.vnx import utils
from cinder.tests.unit.volume.drivers.dell_emc.vnx import fake_storops \
as storops
from cinder.tests.unit.volume.drivers.dell_emc.vnx import res_mock
from cinder.tests.unit.volume.drivers.dell_emc.vnx import utils as ut_utils
from cinder.volume.drivers.dell_emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import utils
class TestUtils(test.TestCase):

View File

@ -20,8 +20,8 @@ import mock
import six
import yaml
from cinder.volume.drivers.emc.vnx import client
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import client
from cinder.volume.drivers.dell_emc.vnx import common
patch_sleep = mock.patch('time.sleep')
@ -46,7 +46,7 @@ def patch_extra_specs(specs):
def patch_extra_specs_validate(return_value=None, side_effect=None):
return _build_patch_decorator(
'cinder.volume.drivers.emc.vnx.common.ExtraSpecs.validate',
'cinder.volume.drivers.dell_emc.vnx.common.ExtraSpecs.validate',
return_value=return_value,
side_effect=side_effect)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -29,10 +29,10 @@ if storops:
from cinder import exception
from cinder.i18n import _, _LI, _LE, _LW
from cinder.objects import fields
from cinder.volume.drivers.emc.vnx import client
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.emc.vnx import taskflows as emc_taskflow
from cinder.volume.drivers.emc.vnx import utils
from cinder.volume.drivers.dell_emc.vnx import client
from cinder.volume.drivers.dell_emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import taskflows as emc_taskflow
from cinder.volume.drivers.dell_emc.vnx import utils
from cinder.zonemanager import utils as zm_utils

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -23,9 +23,9 @@ if storops:
from cinder import exception
from cinder.i18n import _, _LW, _LE
from cinder import utils as cinder_utils
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.emc.vnx import const
from cinder.volume.drivers.emc.vnx import utils
from cinder.volume.drivers.dell_emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import const
from cinder.volume.drivers.dell_emc.vnx import utils
LOG = logging.getLogger(__name__)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -24,7 +24,7 @@ storops = importutils.try_import('storops')
from cinder import exception
from cinder.i18n import _, _LW
from cinder.volume.drivers.emc.vnx import const
from cinder.volume.drivers.dell_emc.vnx import const
from cinder.volume import volume_types
CONF = cfg.CONF
@ -38,7 +38,7 @@ INTERVAL_20_SEC = 20
INTERVAL_30_SEC = 30
INTERVAL_60_SEC = 60
EMC_VNX_OPTS = [
VNX_OPTS = [
cfg.StrOpt('storage_vnx_authentication_type',
default='global',
help='VNX authentication scope type. '
@ -102,7 +102,7 @@ EMC_VNX_OPTS = [
'By default, the value is False.')
]
CONF.register_opts(EMC_VNX_OPTS)
CONF.register_opts(VNX_OPTS)
PROTOCOL_FC = 'fc'

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -18,9 +18,9 @@ from oslo_log import log as logging
from cinder import interface
from cinder.volume import driver
from cinder.volume.drivers.emc.vnx import adapter
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.emc.vnx import utils
from cinder.volume.drivers.dell_emc.vnx import adapter
from cinder.volume.drivers.dell_emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import utils
from cinder.zonemanager import utils as zm_utils
@ -28,15 +28,15 @@ LOG = logging.getLogger(__name__)
@interface.volumedriver
class EMCVNXDriver(driver.TransferVD,
driver.ManageableVD,
driver.ExtendVD,
driver.SnapshotVD,
driver.ManageableSnapshotsVD,
driver.MigrateVD,
driver.ConsistencyGroupVD,
driver.BaseVD):
"""EMC Cinder Driver for VNX using CLI.
class VNXDriver(driver.TransferVD,
driver.ManageableVD,
driver.ExtendVD,
driver.SnapshotVD,
driver.ManageableSnapshotsVD,
driver.MigrateVD,
driver.ConsistencyGroupVD,
driver.BaseVD):
"""Dell EMC Cinder Driver for VNX using CLI.
Version history:
1.0.0 - Initial driver
@ -76,12 +76,12 @@ class EMCVNXDriver(driver.TransferVD,
"""
VERSION = '08.00.00'
VENDOR = 'EMC'
VENDOR = 'Dell EMC'
# ThirdPartySystems wiki page
CI_WIKI_NAME = "EMC_VNX_CI"
def __init__(self, *args, **kwargs):
super(EMCVNXDriver, self).__init__(*args, **kwargs)
super(VNXDriver, self).__init__(*args, **kwargs)
utils.init_ops(self.configuration)
self.protocol = self.configuration.storage_protocol.lower()
self.active_backend_id = kwargs.get('active_backend_id', None)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -24,8 +24,8 @@ from taskflow import task
from taskflow.types import failure
from cinder import exception
from cinder.volume.drivers.emc.vnx import const
from cinder.volume.drivers.emc.vnx import utils
from cinder.volume.drivers.dell_emc.vnx import const
from cinder.volume.drivers.dell_emc.vnx import utils
from cinder.i18n import _, _LI, _LW
LOG = logging.getLogger(__name__)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 EMC Corporation, Inc.
# Copyright (c) 2016 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -25,7 +25,7 @@ storops = importutils.try_import('storops')
from cinder import exception
from cinder.i18n import _, _LW
from cinder.volume.drivers.emc.vnx import common
from cinder.volume.drivers.dell_emc.vnx import common
from cinder.volume.drivers.san.san import san_opts
from cinder.volume import utils as vol_utils
from cinder.volume import volume_types
@ -34,7 +34,7 @@ LOG = logging.getLogger(__name__)
def init_ops(configuration):
configuration.append_config_values(common.EMC_VNX_OPTS)
configuration.append_config_values(common.VNX_OPTS)
configuration.append_config_values(san_opts)

View File

@ -151,6 +151,8 @@ MAPPING = {
'cinder.volume.drivers.ibm.ibm_storage',
'cinder.volume.drivers.emc.scaleio':
'cinder.volume.drivers.dell_emc.scaleio.driver',
'cinder.volume.drivers.emc.vnx.driver.EMCVNXDriver':
'cinder.volume.drivers.dell_emc.vnx.driver.VNXDriver'
}

View File

@ -0,0 +1,7 @@
---
upgrade:
- EMC VNX driver have been rebranded to Dell EMC VNX driver.
Existing configurations will continue to work with the legacy name,
but will need to be updated by the next release.
User needs update ``volume_driver`` to
``cinder.volume.drivers.dell_emc.vnx.driver.VNXDriver``.