WINDOWS_MODULE = "cinder.volume.drivers.windows.WindowsDriver"
XIV_DS8K_MODULE = "cinder.volume.drivers.xiv_ds8k.XIVDS8KDriver"
ZADARA_MODULE = "cinder.volume.drivers.zadara.ZadaraVPSAISCSIDriver"
+NETAPP_MODULE = "cinder.volume.drivers.netapp.common.Deprecated"
class VolumeDriverCompatibility(test.TestCase):
def test_zadara_new(self):
self._load_driver(ZADARA_MODULE)
self.assertEquals(self._driver_module_name(), ZADARA_MODULE)
+
+ def test_netapp_7m_iscsi_old(self):
+ self._load_driver(
+ 'cinder.volume.drivers.netapp.iscsi.NetAppISCSIDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_7m_iscsi_old_old(self):
+ self._load_driver('cinder.volume.netapp.NetAppISCSIDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_cm_iscsi_old_old(self):
+ self._load_driver('cinder.volume.netapp.NetAppCmodeISCSIDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_cm_iscsi_old(self):
+ self._load_driver(
+ 'cinder.volume.drivers.netapp.iscsi.NetAppCmodeISCSIDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_7m_nfs_old_old(self):
+ self._load_driver('cinder.volume.netapp_nfs.NetAppNFSDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_7m_nfs_old(self):
+ self._load_driver('cinder.volume.drivers.netapp.nfs.NetAppNFSDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
+
+ def test_netapp_cm_nfs_old(self):
+ self._load_driver(
+ 'cinder.volume.drivers.netapp.nfs.NetAppCmodeNfsDriver')
+ self.assertEquals(self._driver_module_name(), NETAPP_MODULE)
Supports call to multiple storage systems of different families and protocols.
"""
+from oslo.config import cfg
+
from cinder import exception
from cinder.openstack.common import importutils
from cinder.openstack.common import log as logging
+from cinder.volume import driver
from cinder.volume.drivers.netapp.options import netapp_proxy_opts
-from oslo.config import cfg
LOG = logging.getLogger(__name__)
#No other code modification required.
netapp_unified_plugin_registry =\
{'ontap_cluster':
- {
- 'iscsi':
- 'cinder.volume.drivers.netapp.iscsi.NetAppDirectCmodeISCSIDriver',
- 'nfs': 'cinder.volume.drivers.netapp.nfs.NetAppDirectCmodeNfsDriver'
- }, 'ontap_7mode':
+ {
+ 'iscsi':
+ 'cinder.volume.drivers.netapp.iscsi.NetAppDirectCmodeISCSIDriver',
+ 'nfs': 'cinder.volume.drivers.netapp.nfs.NetAppDirectCmodeNfsDriver'
+ }, 'ontap_7mode':
{
'iscsi':
'cinder.volume.drivers.netapp.iscsi.NetAppDirect7modeISCSIDriver',
'nfs':
'cinder.volume.drivers.netapp.nfs.NetAppDirect7modeNfsDriver'
},
- }
+ }
#NOTE(singn): Holds family:protocol information.
#Protocol represents the default protocol driver option
if location.find(".netapp.") == -1:
raise exception.InvalidInput(
reason=_("Only loading netapp drivers supported."))
+
+
+class Deprecated(driver.VolumeDriver):
+ """Deprecated driver for NetApp.
+
+ This driver is used for mapping deprecated
+ drivers to itself in manager. It prevents cinder
+ from getting errored out in case of upgrade scenarios
+ and also suggests further steps.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self._log_deprecated_warn()
+
+ def _log_deprecated_warn(self):
+ """Logs appropriate warning and suggestion."""
+
+ link = "https://communities.netapp.com/groups/openstack"
+ msg = _("The configured NetApp driver is deprecated."
+ " Please refer the link to resolve the issue '%s'.")
+ LOG.warn(msg % link)
+
+ def check_for_setup_error(self):
+ pass
+
+ def ensure_export(self, context, volume):
+ pass
+
+ def get_volume_stats(self, refresh=False):
+ """Return the current state of the volume service. If 'refresh' is
+ True, run the update first.
+ """
+ self._log_deprecated_warn()
+ return None
'cinder.volume.zadara.ZadaraVPSAISCSIDriver':
'cinder.volume.drivers.zadara.ZadaraVPSAISCSIDriver',
'cinder.volume.driver.ISCSIDriver':
- 'cinder.volume.drivers.lvm.LVMISCSIDriver'}
+ 'cinder.volume.drivers.lvm.LVMISCSIDriver',
+ 'cinder.volume.netapp.NetAppISCSIDriver':
+ 'cinder.volume.drivers.netapp.common.Deprecated',
+ 'cinder.volume.drivers.netapp.iscsi.NetAppISCSIDriver':
+ 'cinder.volume.drivers.netapp.common.Deprecated',
+ 'cinder.volume.netapp.NetAppCmodeISCSIDriver':
+ 'cinder.volume.drivers.netapp.common.Deprecated',
+ 'cinder.volume.drivers.netapp.iscsi.NetAppCmodeISCSIDriver':
+ 'cinder.volume.drivers.netapp.common.Deprecated',
+ 'cinder.volume.netapp_nfs.NetAppNFSDriver':
+ 'cinder.volume.drivers.netapp.common.Deprecated',
+ 'cinder.volume.drivers.netapp.nfs.NetAppNFSDriver':
+ 'cinder.volume.drivers.netapp.common.Deprecated',
+ 'cinder.volume.drivers.netapp.nfs.NetAppCmodeNfsDriver':
+ 'cinder.volume.drivers.netapp.common.Deprecated'}
class VolumeManager(manager.SchedulerDependentManager):