flags.DECLARE('iscsi_num_targets', 'cinder.volume.driver')
flags.DECLARE('policy_file', 'cinder.policy')
flags.DECLARE('volume_driver', 'cinder.volume.manager')
-flags.DECLARE('xiv_proxy', 'cinder.volume.xiv')
+flags.DECLARE('xiv_proxy', 'cinder.volume.drivers.xiv')
def_vol_type = 'fake_vol_type'
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import test
-from cinder.volume.san.hp_lefthand import HpSanISCSIDriver
+from cinder.volume.drivers.san.hp_lefthand import HpSanISCSIDriver
LOG = logging.getLogger(__name__)
RBD_MODULE = "cinder.volume.drivers.rbd.RBDDriver"
SHEEPDOG_MODULE = "cinder.volume.drivers.sheepdog.SheepdogDriver"
+NEXENTA_MODULE = "cinder.volume.drivers.nexenta.volume.NexentaDriver"
+SAN_MODULE = "cinder.volume.drivers.san.san.SanISCSIDriver"
+SOLARIS_MODULE = "cinder.volume.drivers.san.solaris.SolarisISCSIDriver"
+LEFTHAND_MODULE = "cinder.volume.drivers.san.hp_lefthand.HpSanISCSIDriver"
+NETAPP_MODULE = "cinder.volume.drivers.netapp.NetAppISCSIDriver"
+NETAPP_CMODE_MODULE = "cinder.volume.drivers.netapp.NetAppCmodeISCSIDriver"
+NETAPP_NFS_MODULE = "cinder.volume.drivers.netapp_nfs.NetAppNFSDriver"
+NFS_MODULE = "cinder.volume.drivers.nfs.NfsDriver"
+SOLIDFIRE_MODULE = "cinder.volume.drivers.solidfire.SolidFire"
+STORWIZE_SVC_MODULE = "cinder.volume.drivers.storwize_svc.StorwizeSVCDriver"
+WINDOWS_MODULE = "cinder.volume.drivers.windows.WindowsDriver"
+XIV_MODULE = "cinder.volume.drivers.xiv.XIVDriver"
+ZADARA_MODULE = "cinder.volume.drivers.zadara.ZadaraVPSAISCSIDriver"
class VolumeDriverCompatibility(test.TestCase):
self.assertEquals(self._driver_module_name(), SHEEPDOG_MODULE)
def test_sheepdog_new(self):
- self._load_driver('cinder.volume.drivers.sheepdog.SheepdogDriver')
+ self._load_driver(SHEEPDOG_MODULE)
self.assertEquals(self._driver_module_name(), SHEEPDOG_MODULE)
+
+ def test_nexenta_old(self):
+ self._load_driver('cinder.volume.nexenta.volume.NexentaDriver')
+ self.assertEquals(self._driver_module_name(), NEXENTA_MODULE)
+
+ def test_nexenta_new(self):
+ self._load_driver(NEXENTA_MODULE)
+ self.assertEquals(self._driver_module_name(), NEXENTA_MODULE)
+
+ def test_san_old(self):
+ self._load_driver('cinder.volume.san.SanISCSIDriver')
+ self.assertEquals(self._driver_module_name(), SAN_MODULE)
+
+ def test_san_new(self):
+ self._load_driver(SAN_MODULE)
+ self.assertEquals(self._driver_module_name(), SAN_MODULE)
+
+ def test_solaris_old(self):
+ self._load_driver('cinder.volume.san.SolarisISCSIDriver')
+ self.assertEquals(self._driver_module_name(), SOLARIS_MODULE)
+
+ def test_solaris_new(self):
+ self._load_driver(SOLARIS_MODULE)
+ self.assertEquals(self._driver_module_name(), SOLARIS_MODULE)
+
+ def test_hp_lefthand_old(self):
+ self._load_driver('cinder.volume.san.HpSanISCSIDriver')
+ self.assertEquals(self._driver_module_name(), LEFTHAND_MODULE)
+
+ def test_hp_lefthand_new(self):
+ self._load_driver(LEFTHAND_MODULE)
+ self.assertEquals(self._driver_module_name(), LEFTHAND_MODULE)
+
+ def test_netapp_old(self):
+ self._load_driver('cinder.volume.netapp.NetAppISCSIDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_new(self):
+ self._load_driver(NETAPP_MODULE)
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_cmode_old(self):
+ self._load_driver('cinder.volume.netapp.NetAppCmodeISCSIDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_CMODE_MODULE)
+
+ def test_netapp_cmode_new(self):
+ self._load_driver(NETAPP_CMODE_MODULE)
+ self.assertEquals(self._driver_module_name(), NETAPP_CMODE_MODULE)
+
+ def test_netapp_nfs_old(self):
+ self._load_driver('cinder.volume.netapp_nfs.NetAppNFSDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_NFS_MODULE)
+
+ def test_netapp_nfs_new(self):
+ self._load_driver(NETAPP_NFS_MODULE)
+ self.assertEquals(self._driver_module_name(), NETAPP_NFS_MODULE)
+
+ def test_nfs_old(self):
+ self._load_driver('cinder.volume.nfs.NfsDriver')
+ self.assertEquals(self._driver_module_name(), NFS_MODULE)
+
+ def test_nfs_new(self):
+ self._load_driver(NFS_MODULE)
+ self.assertEquals(self._driver_module_name(), NFS_MODULE)
+
+ def test_solidfire_old(self):
+ self._load_driver('cinder.volume.solidfire.SolidFire')
+ self.assertEquals(self._driver_module_name(), SOLIDFIRE_MODULE)
+
+ def test_solidfire_new(self):
+ self._load_driver(SOLIDFIRE_MODULE)
+ self.assertEquals(self._driver_module_name(), SOLIDFIRE_MODULE)
+
+ def test_storwize_svc_old(self):
+ self._load_driver('cinder.volume.storwize_svc.StorwizeSVCDriver')
+ self.assertEquals(self._driver_module_name(), STORWIZE_SVC_MODULE)
+
+ def test_storwize_svc_new(self):
+ self._load_driver(STORWIZE_SVC_MODULE)
+ self.assertEquals(self._driver_module_name(), STORWIZE_SVC_MODULE)
+
+ def test_windows_old(self):
+ self._load_driver('cinder.volume.windows.WindowsDriver')
+ self.assertEquals(self._driver_module_name(), WINDOWS_MODULE)
+
+ def test_windows_new(self):
+ self._load_driver(WINDOWS_MODULE)
+ self.assertEquals(self._driver_module_name(), WINDOWS_MODULE)
+
+ def test_xiv_old(self):
+ self._load_driver('cinder.volume.xiv.XIVDriver')
+ self.assertEquals(self._driver_module_name(), XIV_MODULE)
+
+ def test_xiv_new(self):
+ self._load_driver(XIV_MODULE)
+ self.assertEquals(self._driver_module_name(), XIV_MODULE)
+
+ def test_zadara_old(self):
+ self._load_driver('cinder.volume.zadara.ZadaraVPSAISCSIDriver')
+ self.assertEquals(self._driver_module_name(), ZADARA_MODULE)
+
+ def test_zadara_new(self):
+ self._load_driver(ZADARA_MODULE)
+ self.assertEquals(self._driver_module_name(), ZADARA_MODULE)
from cinder.openstack.common import log as logging
from cinder import test
-from cinder.volume import netapp
+from cinder.volume.drivers import netapp
LOG = logging.getLogger("cinder.volume.driver")
from cinder import exception
from cinder import test
-from cinder.volume import netapp
-from cinder.volume import netapp_nfs
-from cinder.volume import nfs
+from cinder.volume.drivers import netapp
+from cinder.volume.drivers import netapp_nfs
+from cinder.volume.drivers import nfs
from mox import IgnoreArg
from mox import IsA
from mox import MockObject
import cinder.flags
import cinder.test
-from cinder.volume import nexenta
-from cinder.volume.nexenta import jsonrpc
-from cinder.volume.nexenta import volume
+from cinder.volume.drivers import nexenta
+from cinder.volume.drivers.nexenta import jsonrpc
+from cinder.volume.drivers.nexenta import volume
FLAGS = cinder.flags.FLAGS
from cinder.exception import ProcessExecutionError
from cinder import test
-from cinder.volume import nfs
+from cinder.volume.drivers import nfs
class DumbVolume(object):
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import test
-from cinder.volume.solidfire import SolidFire
+from cinder.volume.drivers.solidfire import SolidFire
LOG = logging.getLogger(__name__)
from cinder.openstack.common import excutils
from cinder.openstack.common import log as logging
from cinder import test
-from cinder.volume import storwize_svc
+from cinder.volume.drivers import storwize_svc
FLAGS = flags.FLAGS
from cinder.tests.windows import basetestcase
from cinder.tests.windows import db_fakes
from cinder.tests.windows import windowsutils
-from cinder.volume import windows
+from cinder.volume.drivers import windows
FLAGS = cinder.flags.FLAGS
from cinder.api import openstack as openstack_api
from cinder import exception
from cinder import test
-from cinder.volume import xiv
import cinder.wsgi
# License for the specific language governing permissions and limitations
# under the License.
-from cinder.volume.xenapi import lib
-from cinder.volume import xenapi_sm as driver
+from cinder.volume.drivers.xenapi import lib
+from cinder.volume.drivers.xenapi import sm as driver
import mox
import unittest
from cinder import exception
from cinder import flags
from cinder import test
-from cinder.volume import xiv
+from cinder.volume.drivers import xiv
FLAGS = flags.FLAGS
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import test
-from cinder.volume import zadara
+from cinder.volume.drivers import zadara
from lxml import etree
from cinder.volume import driver
from cinder.volume import volume_types
-LOG = logging.getLogger("cinder.volume.driver")
+LOG = logging.getLogger(__name__)
netapp_opts = [
cfg.StrOpt('netapp_wsdl_url',
from cinder import flags
from cinder.openstack.common import cfg
from cinder.openstack.common import log as logging
-from cinder.volume.netapp import netapp_opts
-from cinder.volume import nfs
+from cinder.volume.drivers.netapp import netapp_opts
+from cinder.volume.drivers import nfs
-LOG = logging.getLogger("cinder.volume.driver")
+LOG = logging.getLogger(__name__)
netapp_nfs_opts = [
cfg.IntOpt('synchronous_snapshot_create',
from cinder.openstack.common import jsonutils
from cinder.openstack.common import log as logging
-from cinder.volume import nexenta
+from cinder.volume.drivers import nexenta
-LOG = logging.getLogger("cinder.volume.nexenta.jsonrpc")
+LOG = logging.getLogger(__name__)
class NexentaJSONException(nexenta.NexentaException):
from cinder.openstack.common import cfg
from cinder.openstack.common import log as logging
from cinder.volume import driver
-from cinder.volume import nexenta
-from cinder.volume.nexenta import jsonrpc
+from cinder.volume.drivers import nexenta
+from cinder.volume.drivers.nexenta import jsonrpc
-LOG = logging.getLogger("cinder.volume.nexenta.volume")
+LOG = logging.getLogger(__name__)
FLAGS = flags.FLAGS
nexenta_opts = [
from cinder.openstack.common import log as logging
from cinder.volume import driver
-LOG = logging.getLogger("cinder.volume.driver")
+LOG = logging.getLogger(__name__)
volume_opts = [
cfg.StrOpt('nfs_shares_config',
from cinder import exception
from cinder import flags
from cinder.openstack.common import log as logging
-from cinder.volume.san.san import SanISCSIDriver
+from cinder.volume.drivers.san.san import SanISCSIDriver
LOG = logging.getLogger(__name__)
from cinder import flags
from cinder.openstack.common import cfg
from cinder.openstack.common import log as logging
-from cinder.volume.san.san import SanISCSIDriver
+from cinder.volume.drivers.san.san import SanISCSIDriver
LOG = logging.getLogger(__name__)
from cinder import flags
from cinder.openstack.common import cfg
from cinder.openstack.common import log as logging
-from cinder.volume.san.san import SanISCSIDriver
+from cinder.volume.drivers.san.san import SanISCSIDriver
LOG = logging.getLogger(__name__)
from cinder.openstack.common import cfg
from cinder.openstack.common import excutils
from cinder.openstack.common import log as logging
-from cinder.volume.san import san
+from cinder.volume.drivers.san import san
LOG = logging.getLogger(__name__)
import wmi
-LOG = logging.getLogger("cinder.volume.windows.volume")
+LOG = logging.getLogger(__name__)
FLAGS = flags.FLAGS
--- /dev/null
+# Copyright 2012 OpenStack LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
from cinder import flags
from cinder.openstack.common import cfg
from cinder.volume import driver
-from cinder.volume.xenapi import lib as xenapi_lib
+from cinder.volume.drivers.xenapi import lib as xenapi_lib
xenapi_opts = [
from cinder.openstack.common import cfg
from cinder.openstack.common import importutils
from cinder.openstack.common import log as logging
-from cinder.volume.san import san
+from cinder.volume.drivers.san import san
ibm_xiv_opts = [
cfg.StrOpt('xiv_proxy',
'cinder.volume.driver.RBDDriver': 'cinder.volume.drivers.rbd.RBDDriver',
'cinder.volume.driver.SheepdogDriver':
'cinder.volume.drivers.sheepdog.SheepdogDriver',
+ 'cinder.volume.nexenta.volume.NexentaDriver':
+ 'cinder.volume.drivers.nexenta.volume.NexentaDriver',
+ 'cinder.volume.san.SanISCSIDriver':
+ 'cinder.volume.drivers.san.san.SanISCSIDriver',
+ 'cinder.volume.san.SolarisISCSIDriver':
+ 'cinder.volume.drivers.san.solaris.SolarisISCSIDriver',
+ 'cinder.volume.san.HpSanISCSIDriver':
+ 'cinder.volume.drivers.san.hp_lefthand.HpSanISCSIDriver',
+ 'cinder.volume.netapp.NetAppISCSIDriver':
+ 'cinder.volume.drivers.netapp.NetAppISCSIDriver',
+ 'cinder.volume.netapp.NetAppCmodeISCSIDriver':
+ 'cinder.volume.drivers.netapp.NetAppCmodeISCSIDriver',
+ 'cinder.volume.netapp_nfs.NetAppNFSDriver':
+ 'cinder.volume.drivers.netapp_nfs.NetAppNFSDriver',
+ 'cinder.volume.nfs.NfsDriver':
+ 'cinder.volume.drivers.nfs.NfsDriver',
+ 'cinder.volume.solidfire.SolidFire':
+ 'cinder.volume.drivers.solidfire.SolidFire',
+ 'cinder.volume.storwize_svc.StorwizeSVCDriver':
+ 'cinder.volume.drivers.storwize_svc.StorwizeSVCDriver',
+ 'cinder.volume.windows.WindowsDriver':
+ 'cinder.volume.drivers.windows.WindowsDriver',
+ 'cinder.volume.xiv.XIVDriver':
+ 'cinder.volume.drivers.xiv.XIVDriver',
+ 'cinder.volume.zadara.ZadaraVPSAISCSIDriver':
+ 'cinder.volume.drivers.zadara.ZadaraVPSAISCSIDriver'
}
if not volume_driver:
volume_driver = FLAGS.volume_driver
if volume_driver in MAPPING:
+ LOG.warn(_("Driver path %s is deprecated, update your "
+ "configuration to the new path."), volume_driver)
self.driver = importutils.import_object(MAPPING[volume_driver])
else:
self.driver = importutils.import_object(volume_driver)
#### (BoolOpt) if True will force update capabilities on each check
-######## defined in cinder.volume.netapp ########
+######## defined in cinder.volume.drivers.netapp ########
# netapp_wsdl_url=<None>
#### (StrOpt) URL of the WSDL file for the DFM server
#### (StrOpt) Vfiler to use for provisioning
-######## defined in cinder.volume.netapp_nfs ########
+######## defined in cinder.volume.drivers.netapp_nfs ########
# synchronous_snapshot_create=0
#### (IntOpt) Does snapshot creation call returns immediately
#### (StrOpt) Vfiler to use for provisioning
-######## defined in cinder.volume.nexenta.volume ########
+######## defined in cinder.volume.drivers.nexenta.volume ########
# nexenta_host=
#### (StrOpt) IP address of Nexenta SA
#### (BoolOpt) flag to create sparse volumes
-######## defined in cinder.volume.nfs ########
+######## defined in cinder.volume.drivers.nfs ########
# nfs_shares_config=<None>
#### (StrOpt) File with the list of available nfs shares
#### volume creation takes a lot of time.
-######## defined in cinder.volume.san ########
+######## defined in cinder.volume.drivers.san.san ########
# san_thin_provision=true
#### (BoolOpt) Use thin provisioning for SAN volumes?
#### (IntOpt) Maximum ssh connections in the pool
-######## defined in cinder.volume.solaris ########
+######## defined in cinder.volume.drivers.san.solaris ########
# san_zfs_volume_base=rpool/
#### (StrOpt) The ZFS path under which to create zvols for volumes.
-######## defined in cinder.volume.solidfire ########
+######## defined in cinder.volume.drivers.solidfire ########
# sf_emulate_512=true
#### (BoolOpt) Set 512 byte emulation on volume creation;
#### (BoolOpt) Allow tenants to specify QOS on create
-######## defined in cinder.volume.storwize_svc ########
+######## defined in cinder.volume.drivers.storwize_svc ########
# storwize_svc_volpool_name=volpool
#### (StrOpt) Storage system storage pool for volumes
#### prepared. Maximum value is 600 seconds (10 minutes).
-######## defined in cinder.volume.xiv ########
+######## defined in cinder.volume.drivers.xiv ########
# xiv_proxy=xiv_openstack.nova_proxy.XIVNovaProxy
#### (StrOpt) Proxy driver
-######## defined in cinder.volume.zadara ########
+######## defined in cinder.volume.drivers.zadara ########
# zadara_vpsa_ip=<None>
#### (StrOpt) Management IP of Zadara VPSA