self._get_output(chan)
cmd = 'stty columns 255'
- LOG.debug("Setting CLI terminal width: '%s'", cmd)
+ LOG.debug("Setting CLI terminal width: '%s'.", cmd)
chan.send(cmd + '\r')
out = self._get_output(chan)
- LOG.debug("Sending CLI command: '%s'", command)
+ LOG.debug("Sending CLI command: '%s'.", command)
chan.send(command + '\r')
out = self._get_output(chan)
while attempts > 0:
attempts -= 1
try:
- LOG.info(_('EQL-driver: executing "%s"') % command)
+ LOG.info(_('EQL-driver: executing "%s".'), command)
return self._ssh_execute(
ssh, command,
timeout=self.configuration.eqlx_cli_timeout)
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_("Error running SSH command: %s") % command)
+ LOG.error(_('Error running SSH command: "%s".'), command)
def _eql_execute(self, *args, **kwargs):
return self._run_ssh(
def _update_volume_stats(self):
"""Retrieve stats info from eqlx group."""
- LOG.debug("Updating volume stats")
+ LOG.debug('Updating volume stats.')
data = {}
backend_name = "eqlx"
if self.configuration:
out_tup = line.rstrip().partition(' ')
self._group_ip = out_tup[-1]
- LOG.info(_("EQL-driver: Setup is complete, group IP is %s"),
+ LOG.info(_('EQL-driver: Setup is complete, group IP is "%s".'),
self._group_ip)
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to setup the Dell EqualLogic driver'))
+ LOG.error(_('Failed to setup the Dell EqualLogic driver.'))
def create_volume(self, volume):
"""Create a volume."""
return self._get_volume_data(out)
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to create volume %s'), volume['name'])
+ LOG.error(_('Failed to create volume "%s".'), volume['name'])
def add_multihost_access(self, volume):
"""Add multihost-access to a volume. Needed for live migration."""
self._eql_execute(*cmd)
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to add multi-host access for volume %s'),
+ LOG.error(_('Failed to add multihost-access'
+ ' for volume "%s".'),
volume['name'])
def delete_volume(self, volume):
self._eql_execute('volume', 'select', volume['name'], 'offline')
self._eql_execute('volume', 'delete', volume['name'])
except exception.VolumeNotFound:
- LOG.warn(_('Volume %s was not found while trying to delete it'),
+ LOG.warn(_('Volume %s was not found while trying to delete it.'),
volume['name'])
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to delete volume %s'), volume['name'])
+ LOG.error(_('Failed to delete volume "%s".'), volume['name'])
def create_snapshot(self, snapshot):
""""Create snapshot of existing volume on appliance."""
snapshot['name'])
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to create snapshot of volume %s'),
+ LOG.error(_('Failed to create snapshot of volume "%s".'),
snapshot['volume_name'])
def create_volume_from_snapshot(self, volume, snapshot):
return self._get_volume_data(out)
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to create volume from snapshot %s'),
+ LOG.error(_('Failed to create volume from snapshot "%s".'),
snapshot['name'])
def create_cloned_volume(self, volume, src_vref):
return self._get_volume_data(out)
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to create clone of volume %s'),
+ LOG.error(_('Failed to create clone of volume "%s".'),
volume['name'])
def delete_snapshot(self, snapshot):
except Exception:
with excutils.save_and_reraise_exception():
LOG.error(_('Failed to delete snapshot %(snap)s of '
- 'volume %(vol)s'),
+ 'volume %(vol)s.'),
{'snap': snapshot['name'],
- 'vol': snapshot['volume_name']})
+ 'vol': snapshot['volume_name']})
def initialize_connection(self, volume, connector):
"""Restrict access to a volume."""
}
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to initialize connection to volume %s'),
+ LOG.error(_('Failed to initialize connection'
+ ' to volume "%s".'),
volume['name'])
def terminate_connection(self, volume, connector, force=False, **kwargs):
'access', 'delete', connection_id)
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to terminate connection to volume %s'),
+ LOG.error(_('Failed to terminate connection'
+ ' to volume "%s".'),
volume['name'])
def create_export(self, context, volume):
try:
self._check_volume(volume)
except exception.VolumeNotFound:
- LOG.warn(_('Volume %s is not found!, it may have been deleted'),
+ LOG.warn(_('Volume %s is not found!, it may have been deleted.'),
volume['name'])
except Exception:
with excutils.save_and_reraise_exception():
- LOG.error(_('Failed to ensure export of volume %s'),
+ LOG.error(_('Failed to ensure export of volume "%s".'),
volume['name'])
def remove_export(self, context, volume):
except Exception:
with excutils.save_and_reraise_exception():
LOG.error(_('Failed to extend_volume %(name)s from '
- '%(current_size)sGB to %(new_size)sGB'),
+ '%(current_size)sGB to %(new_size)sGB.'),
{'name': volume['name'],
- 'current_size': volume['size'],
+ 'current_size': volume['size'],
'new_size': new_size})
def local_path(self, volume):