Merge "Dell SC: Expanded comments and update var names"
This commit is contained in:
commit
66029a2500
File diff suppressed because it is too large
Load Diff
@ -92,9 +92,9 @@ class DellCommonDriver(san.SanDriver):
|
|||||||
# We use id as our name as it is unique.
|
# We use id as our name as it is unique.
|
||||||
volume_name = volume.get('id')
|
volume_name = volume.get('id')
|
||||||
volume_size = volume.get('size')
|
volume_size = volume.get('size')
|
||||||
LOG.debug('Creating volume %(n)s of size %(s)s',
|
LOG.debug('Creating volume %(name)s of size %(size)s',
|
||||||
{'n': volume_name,
|
{'name': volume_name,
|
||||||
's': volume_size})
|
'size': volume_size})
|
||||||
scvolume = None
|
scvolume = None
|
||||||
with self._client.open_connection() as api:
|
with self._client.open_connection() as api:
|
||||||
try:
|
try:
|
||||||
@ -183,9 +183,9 @@ class DellCommonDriver(san.SanDriver):
|
|||||||
LOG.error(_LE('Failed to create volume %s'),
|
LOG.error(_LE('Failed to create volume %s'),
|
||||||
volume_name)
|
volume_name)
|
||||||
if scvolume is not None:
|
if scvolume is not None:
|
||||||
LOG.debug('Volume %(n)s created from %(s)s',
|
LOG.debug('Volume %(vol)s created from %(snap)s',
|
||||||
{'n': volume_name,
|
{'vol': volume_name,
|
||||||
's': snapshot_id})
|
'snap': snapshot_id})
|
||||||
else:
|
else:
|
||||||
raise exception.VolumeBackendAPIException(
|
raise exception.VolumeBackendAPIException(
|
||||||
_('Failed to create volume %s') % volume_name)
|
_('Failed to create volume %s') % volume_name)
|
||||||
@ -210,9 +210,9 @@ class DellCommonDriver(san.SanDriver):
|
|||||||
LOG.error(_LE('Failed to create volume %s'),
|
LOG.error(_LE('Failed to create volume %s'),
|
||||||
volume_name)
|
volume_name)
|
||||||
if scvolume is not None:
|
if scvolume is not None:
|
||||||
LOG.debug('Volume %(n)s cloned from %(s)s',
|
LOG.debug('Volume %(vol)s cloned from %(src)s',
|
||||||
{'n': volume_name,
|
{'vol': volume_name,
|
||||||
's': src_volume_name})
|
'src': src_volume_name})
|
||||||
else:
|
else:
|
||||||
raise exception.VolumeBackendAPIException(
|
raise exception.VolumeBackendAPIException(
|
||||||
_('Failed to create volume %s') % volume_name)
|
_('Failed to create volume %s') % volume_name)
|
||||||
@ -263,7 +263,7 @@ class DellCommonDriver(san.SanDriver):
|
|||||||
volume_name)
|
volume_name)
|
||||||
if scvolume is None:
|
if scvolume is None:
|
||||||
raise exception.VolumeBackendAPIException(
|
raise exception.VolumeBackendAPIException(
|
||||||
_('unable to find volume %s') % volume_name)
|
_('Unable to find volume %s') % volume_name)
|
||||||
|
|
||||||
def remove_export(self, context, volume):
|
def remove_export(self, context, volume):
|
||||||
'''Remove an export of a volume.
|
'''Remove an export of a volume.
|
||||||
@ -277,7 +277,8 @@ class DellCommonDriver(san.SanDriver):
|
|||||||
'''Extend the size of the volume.'''
|
'''Extend the size of the volume.'''
|
||||||
volume_name = volume.get('id')
|
volume_name = volume.get('id')
|
||||||
LOG.debug('Extending volume %(vol)s to %(size)s',
|
LOG.debug('Extending volume %(vol)s to %(size)s',
|
||||||
{'vol': volume_name, 'size': new_size})
|
{'vol': volume_name,
|
||||||
|
'size': new_size})
|
||||||
if volume is not None:
|
if volume is not None:
|
||||||
with self._client.open_connection() as api:
|
with self._client.open_connection() as api:
|
||||||
if api.find_sc():
|
if api.find_sc():
|
||||||
@ -323,25 +324,25 @@ class DellCommonDriver(san.SanDriver):
|
|||||||
data['free_capacity_gb'] = freespacegb
|
data['free_capacity_gb'] = freespacegb
|
||||||
data['QoS_support'] = False
|
data['QoS_support'] = False
|
||||||
self._stats = data
|
self._stats = data
|
||||||
LOG.debug('Total cap %(t)s Free cap %(f)s',
|
LOG.debug('Total cap %(total)s Free cap %(free)s',
|
||||||
{'t': data['total_capacity_gb'],
|
{'total': data['total_capacity_gb'],
|
||||||
'f': data['free_capacity_gb']})
|
'free': data['free_capacity_gb']})
|
||||||
|
|
||||||
def update_migrated_volume(self, ctxt, volume, new_volume):
|
def update_migrated_volume(self, ctxt, volume, new_volume):
|
||||||
"""Return model update for migrated volume.
|
'''Return model update for migrated volume.
|
||||||
|
|
||||||
:param volume: The original volume that was migrated to this backend
|
:param volume: The original volume that was migrated to this backend
|
||||||
:param new_volume: The migration volume object that was created on
|
:param new_volume: The migration volume object that was created on
|
||||||
this backend as part of the migration process
|
this backend as part of the migration process
|
||||||
:return model_update to update DB with any needed changes
|
:return model_update to update DB with any needed changes
|
||||||
"""
|
'''
|
||||||
# We use id as our volume name so we need to rename the backend
|
# We use id as our volume name so we need to rename the backend
|
||||||
# volume to the original volume name.
|
# volume to the original volume name.
|
||||||
original_volume_name = volume.get('id')
|
original_volume_name = volume.get('id')
|
||||||
current_name = new_volume.get('id')
|
current_name = new_volume.get('id')
|
||||||
LOG.debug('update_migrated_volume: %(c)s to %(o)s',
|
LOG.debug('update_migrated_volume: %(current)s to %(original)s',
|
||||||
{'c': current_name,
|
{'current': current_name,
|
||||||
'o': original_volume_name})
|
'original': original_volume_name})
|
||||||
if original_volume_name:
|
if original_volume_name:
|
||||||
with self._client.open_connection() as api:
|
with self._client.open_connection() as api:
|
||||||
if api.find_sc():
|
if api.find_sc():
|
||||||
|
@ -35,7 +35,7 @@ class DellStorageCenterFCDriver(dell_storagecenter_common.DellCommonDriver,
|
|||||||
volume_driver=cinder.volume.drivers.dell.DellStorageCenterFCDriver
|
volume_driver=cinder.volume.drivers.dell.DellStorageCenterFCDriver
|
||||||
'''
|
'''
|
||||||
|
|
||||||
VERSION = '1.0.1'
|
VERSION = '1.0.2'
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(DellStorageCenterFCDriver, self).__init__(*args, **kwargs)
|
super(DellStorageCenterFCDriver, self).__init__(*args, **kwargs)
|
||||||
@ -95,11 +95,10 @@ class DellStorageCenterFCDriver(dell_storagecenter_common.DellCommonDriver,
|
|||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
with excutils.save_and_reraise_exception():
|
with excutils.save_and_reraise_exception():
|
||||||
LOG.error(_LE('Failed to initialize connection '))
|
LOG.error(_LE('Failed to initialize connection.'))
|
||||||
|
|
||||||
# We get here because our mapping is none so blow up.
|
# We get here because our mapping is none so blow up.
|
||||||
raise exception.VolumeBackendAPIException(
|
raise exception.VolumeBackendAPIException(_('Unable to map volume.'))
|
||||||
_('unable to map volume'))
|
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.RemoveFCZone
|
||||||
def terminate_connection(self, volume, connector, force=False, **kwargs):
|
def terminate_connection(self, volume, connector, force=False, **kwargs):
|
||||||
|
@ -34,7 +34,7 @@ class DellStorageCenterISCSIDriver(san.SanISCSIDriver,
|
|||||||
volume_driver=cinder.volume.drivers.dell.DellStorageCenterISCSIDriver
|
volume_driver=cinder.volume.drivers.dell.DellStorageCenterISCSIDriver
|
||||||
'''
|
'''
|
||||||
|
|
||||||
VERSION = '1.0.1'
|
VERSION = '1.0.2'
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(DellStorageCenterISCSIDriver, self).__init__(*args, **kwargs)
|
super(DellStorageCenterISCSIDriver, self).__init__(*args, **kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user