self.configuration.reserved_percentage,
'QoS_support': False,
'vendor_name': "Open Source",
- 'driver_version': '1.0',
+ 'driver_version': self.drv.VERSION,
'storage_protocol': 'unknown',
'volume_backend_name': 'BlockDeviceDriver',
})
expected = dict(
volume_backend_name='RBD',
vendor_name='Open Source',
- driver_version=driver.VERSION,
+ driver_version=self.driver.VERSION,
storage_protocol='ceph',
total_capacity_gb=1177,
free_capacity_gb=953,
expected = dict(
volume_backend_name='RBD',
vendor_name='Open Source',
- driver_version=driver.VERSION,
+ driver_version=self.driver.VERSION,
storage_protocol='ceph',
total_capacity_gb='unknown',
free_capacity_gb='unknown',
expected = dict(
volume_backend_name='sheepdog',
vendor_name='Open Source',
- dirver_version='1.0',
+ dirver_version=self.driver.VERSION,
storage_protocol='sheepdog',
total_capacity_gb=float(107287605248) / (1024 ** 3),
free_capacity_gb=float(107287605248 - 3623897354) / (1024 ** 3),
expected = dict(
volume_backend_name='sheepdog',
vendor_name='Open Source',
- dirver_version='1.0',
+ dirver_version=self.driver.VERSION,
storage_protocol='sheepdog',
total_capacity_gb='unknown',
free_capacity_gb='unknown',
class VolumeDriver(object):
"""Executes commands relating to Volumes."""
+
+ VERSION = "N/A"
+
def __init__(self, execute=utils.execute, *args, **kwargs):
# NOTE(vish): db is set by Manager
self.db = None
def set_execute(self, execute):
self._execute = execute
+ def get_version(self):
+ """Get the current version of this driver."""
+ return self.VERSION
+
def _is_non_recoverable(self, err, non_recoverable_list):
for item in non_recoverable_list:
if item in err:
class BlockDeviceDriver(driver.ISCSIDriver):
- VERSION = '1.0'
+ VERSION = '1.0.0'
def __init__(self, *args, **kwargs):
self.tgtadm = iscsi.get_target_admin()
def get_volume_stats(self, refresh=False):
"""Return Volume Stats."""
- data = {'driver_version': '1.0',
+ data = {'driver_version': self.VERSION,
'free_capacity_gb': 'unknown',
'reserved_percentage': 0,
'storage_protocol': 'aoe',
class EMCSMISISCSIDriver(driver.ISCSIDriver):
"""EMC ISCSI Drivers for VMAX and VNX using SMI-S."""
+ VERSION = "1.0.0"
+
def __init__(self, *args, **kwargs):
super(EMCSMISISCSIDriver, self).__init__(*args, **kwargs)
help=('Create volumes as sparsed files which take no space.'
'If set to False volume is created as regular file.'
'In such case volume creation takes a lot of time.'))]
-VERSION = '1.0'
CONF = cfg.CONF
CONF.register_opts(volume_opts)
driver_volume_type = 'glusterfs'
driver_prefix = 'glusterfs'
volume_backend_name = 'GlusterFS'
- version = VERSION
+ VERSION = '1.0.0'
def __init__(self, *args, **kwargs):
super(GlusterfsDriver, self).__init__(*args, **kwargs)
from cinder import units
from cinder.volume import driver
-VERSION = 1.0
GPFS_CLONE_MIN_RELEASE = 1200
LOG = logging.getLogger(__name__)
"""Implements volume functions using GPFS primitives."""
+ VERSION = "1.0.0"
+
def __init__(self, *args, **kwargs):
super(GPFSDriver, self).__init__(*args, **kwargs)
self.configuration.append_config_values(gpfs_opts)
backend_name = self.configuration.safe_get('volume_backend_name')
data["volume_backend_name"] = backend_name or 'GPFS'
data["vendor_name"] = 'IBM'
- data["driver_version"] = '1.0'
+ data["driver_version"] = self.VERSION
data["storage_protocol"] = 'file'
free, capacity = self._get_available_capacity(self.configuration.
gpfs_mount_point_base)
class HUSDriver(driver.ISCSIDriver):
"""HDS HUS volume driver."""
+ VERSION = HDS_VERSION
+
def _array_info_get(self):
"""Get array parameters."""
out = self.bend.get_version(self.config['hus_cmd'],
class HuaweiISCSIDriver(driver.ISCSIDriver):
"""Huawei T series and Dorado iSCSI volume driver."""
+ VERSION = "1.0.0"
+
def __init__(self, *args, **kwargs):
super(HuaweiISCSIDriver, self).__init__(*args, **kwargs)
self.configuration.append_config_values(huawei_opt)
backend_name = self.configuration.safe_get('volume_backend_name')
data["volume_backend_name"] = backend_name or 'HuaweiISCSIDriver'
data['vendor_name'] = 'Huawei'
- data['driver_version'] = '1.0'
+ data['driver_version'] = self.VERSION
data['storage_protocol'] = 'iSCSI'
data['total_capacity_gb'] = 'infinite'
class LVMVolumeDriver(driver.VolumeDriver):
"""Executes commands relating to Volumes."""
- VERSION = '1.0'
+ VERSION = '1.0.0'
def __init__(self, *args, **kwargs):
super(LVMVolumeDriver, self).__init__(*args, **kwargs)
class NetAppDirectISCSIDriver(driver.ISCSIDriver):
"""NetApp Direct iSCSI volume driver."""
+ VERSION = "1.0.0"
+
IGROUP_PREFIX = 'openstack-'
required_flags = ['netapp_transport_type', 'netapp_login',
'netapp_password', 'netapp_server_hostname',
data["volume_backend_name"] = (
backend_name or 'NetApp_iSCSI_7mode_direct')
data["vendor_name"] = 'NetApp'
- data["driver_version"] = '1.0'
+ data["driver_version"] = self.VERSION
data["storage_protocol"] = 'iSCSI'
data['total_capacity_gb'] = 'infinite'
"""Base class for NetApp NFS driver.
Executes commands relating to Volumes.
"""
+
+ VERSION = "1.0.0"
+
def __init__(self, *args, **kwargs):
# NOTE(vish): db is set by Manager
validate_instantiation(**kwargs)
self._stats["volume_backend_name"] = (backend_name or
'NetApp_NFS_7mode_direct')
self._stats["vendor_name"] = 'NetApp'
- self._stats["driver_version"] = '1.0'
+ self._stats["driver_version"] = self.VERSION
provide_ems(self, self._client, self._stats, netapp_backend,
server_type="7mode")
from cinder.volume.drivers import nexenta
from cinder.volume.drivers.nexenta import jsonrpc
-VERSION = '1.0'
LOG = logging.getLogger(__name__)
NEXENTA_OPTS = [
class NexentaDriver(driver.ISCSIDriver): # pylint: disable=R0921
"""Executes volume driver commands on Nexenta Appliance."""
+ VERSION = '1.0.0'
+
def __init__(self, *args, **kwargs):
super(NexentaDriver, self).__init__(*args, **kwargs)
self.nms = None
backend_name = self.configuration.safe_get('volume_backend_name')
data["volume_backend_name"] = backend_name or self.__class__.__name__
data["vendor_name"] = 'Nexenta'
- data["driver_version"] = VERSION
+ data["driver_version"] = self.VERSION
data["storage_protocol"] = 'iSCSI'
stats = self.nms.volume.get_child_props(CONF.nexenta_volume,
from cinder import units
from cinder.volume import driver
+VERSION = '1.1.0'
+
LOG = logging.getLogger(__name__)
volume_opts = [
'number, the destination will no longer be valid.'))
]
-VERSION = '1.1'
CONF = cfg.CONF
CONF.register_opts(volume_opts)
class RemoteFsDriver(driver.VolumeDriver):
"""Common base for drivers that work like NFS."""
+ VERSION = "0.0.0"
+
def check_for_setup_error(self):
"""Just to override parent behavior."""
pass
backend_name = self.configuration.safe_get('volume_backend_name')
data['volume_backend_name'] = backend_name or self.volume_backend_name
data['vendor_name'] = 'Open Source'
- data['driver_version'] = self.version
+ data['driver_version'] = self.get_version()
data['storage_protocol'] = self.driver_volume_type
self._ensure_shares_mounted()
driver_volume_type = 'nfs'
driver_prefix = 'nfs'
volume_backend_name = 'Generic_NFS'
- version = VERSION
+ VERSION = VERSION
def __init__(self, *args, **kwargs):
super(NfsDriver, self).__init__(*args, **kwargs)
help='where to store temporary image files if the volume '
'driver does not write them directly to the volume'), ]
-VERSION = '1.1'
-
def ascii_str(string):
"""Convert a string to ascii, or return None if the input is None.
class RBDDriver(driver.VolumeDriver):
"""Implements RADOS block device (RBD) volume commands."""
+
+ VERSION = '1.1.0'
+
def __init__(self, *args, **kwargs):
super(RBDDriver, self).__init__(*args, **kwargs)
self.configuration.append_config_values(rbd_opts)
def _update_volume_stats(self):
stats = {
'vendor_name': 'Open Source',
- 'driver_version': VERSION,
+ 'driver_version': self.VERSION,
'storage_protocol': 'ceph',
'total_capacity_gb': 'unknown',
'free_capacity_gb': 'unknown',
from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
from cinder.volume.drivers.san import san
-VERSION = 1.1
LOG = logging.getLogger(__name__)
copy volume <--> Image.
"""
+ VERSION = "1.1.0"
+
def __init__(self, *args, **kwargs):
super(HP3PARFCDriver, self).__init__(*args, **kwargs)
self.common = None
self.common.client_login()
stats = self.common.get_volume_stats(refresh)
stats['storage_protocol'] = 'FC'
+ stats['driver_version'] = self.VERSION
backend_name = self.configuration.safe_get('volume_backend_name')
stats['volume_backend_name'] = backend_name or self.__class__.__name__
self.common.client_logout()
from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
from cinder.volume.drivers.san import san
-VERSION = 1.1
LOG = logging.getLogger(__name__)
DEFAULT_ISCSI_PORT = 3260
session changes, faster clone, requires 3.1.2 MU2 firmware.
"""
+
+ VERSION = "1.1.0"
+
def __init__(self, *args, **kwargs):
super(HP3PARISCSIDriver, self).__init__(*args, **kwargs)
self.common = None
self.common.client_login()
stats = self.common.get_volume_stats(refresh)
stats['storage_protocol'] = 'iSCSI'
+ stats['driver_version'] = self.VERSION
backend_name = self.configuration.safe_get('volume_backend_name')
stats['volume_backend_name'] = backend_name or self.__class__.__name__
self.common.client_logout()
compute layer.
"""
+ VERSION = "1.0.0"
+
device_stats = {}
def __init__(self, *args, **kwargs):
data = {}
backend_name = self.configuration.safe_get('volume_backend_name')
data['volume_backend_name'] = backend_name or self.__class__.__name__
- data['driver_version'] = '1.0'
+ data['driver_version'] = self.VERSION
data['reserved_percentage'] = 0
data['storage_protocol'] = 'iSCSI'
data['vendor_name'] = 'Hewlett-Packard'
devices.
"""
+ VERSION = '1.0.0'
+
def _check_prerequisites(self):
"""Sanity checks before attempting to mount SOFS."""
"""
stats = {
'vendor_name': 'Scality',
- 'driver_version': '1.0',
+ 'driver_version': self.VERSION,
'storage_protocol': 'scality',
'total_capacity_gb': 'infinite',
'free_capacity_gb': 'infinite',
class SheepdogDriver(driver.VolumeDriver):
"""Executes commands relating to Sheepdog Volumes"""
+ VERSION = "1.0.0"
+
def __init__(self, *args, **kwargs):
super(SheepdogDriver, self).__init__(*args, **kwargs)
self.stats_pattern = re.compile(r'[\w\s%]*Total\s(\d+)\s(\d+)*')
backend_name = self.configuration.safe_get('volume_backend_name')
stats["volume_backend_name"] = backend_name or 'sheepdog'
stats['vendor_name'] = 'Open Source'
- stats['dirver_version'] = '1.0'
+ stats['dirver_version'] = self.VERSION
stats['storage_protocol'] = 'sheepdog'
stats['total_capacity_gb'] = 'unknown'
stats['free_capacity_gb'] = 'unknown'
from cinder.volume.drivers.san.san import SanISCSIDriver
from cinder.volume import volume_types
-VERSION = '1.2'
LOG = logging.getLogger(__name__)
sf_opts = [
"""
+ VERSION = '1.2.0'
+
sf_qos_dict = {'slow': {'minIOPS': 100,
'maxIOPS': 200,
'burstIOPS': 200},
backend_name = self.configuration.safe_get('volume_backend_name')
data["volume_backend_name"] = backend_name or self.__class__.__name__
data["vendor_name"] = 'SolidFire Inc'
- data["driver_version"] = VERSION
+ data["driver_version"] = self.VERSION
data["storage_protocol"] = 'iSCSI'
data['total_capacity_gb'] = results['maxProvisionedSpace']
from cinder.volume.drivers.san import san
from cinder.volume import volume_types
-VERSION = 1.1
LOG = logging.getLogger(__name__)
storwize_svc_opts = [
"""====================================================================="""
""" SETUP """
"""====================================================================="""
+ VERSION = "1.1.0"
def __init__(self, *args, **kwargs):
super(StorwizeSVCDriver, self).__init__(*args, **kwargs)
data = {}
data['vendor_name'] = 'IBM'
- data['driver_version'] = '1.1'
+ data['driver_version'] = self.VERSION
data['storage_protocol'] = list(self._enabled_protocols)
data['total_capacity_gb'] = 0 # To be overwritten
class XenAPINFSDriver(driver.VolumeDriver):
+
+ VERSION = "1.0.0"
+
def __init__(self, *args, **kwargs):
super(XenAPINFSDriver, self).__init__(*args, **kwargs)
self.configuration.append_config_values(xenapi_opts)
backend_name = self.configuration.safe_get('volume_backend_name')
data["volume_backend_name"] = backend_name or 'XenAPINFS',
data['vendor_name'] = 'Open Source',
- data['driver_version'] = '1.0'
+ data['driver_version'] = self.VERSION
data['storage_protocol'] = 'xensm'
data['total_capacity_gb'] = 'unknown'
data['free_capacity_gb'] = 'unknown'
"""
ctxt = context.get_admin_context()
+ LOG.info(_("Starting volume driver %(driver_name)s (%(version)s)") %
+ {'driver_name': self.driver.__class__.__name__,
+ 'version': self.driver.get_version()})
self.driver.do_setup(ctxt)
self.driver.check_for_setup_error()