Implementing the use of _L’x’/i18n markers

Placing the _Lx markers back into the code. No other cleaner solution has
has been implemented. Patches will be submitted in a series of sub
directories and in a fashion that is manageable.
eighth commit of this kind
This is the last run through to pick up the ones that were missed

Change-Id: Ifd9d647175a840939bf01fa3bcecfa6384965e3b
Closes-Bug: #1384312
This commit is contained in:
Mike Mason
2014-12-04 09:17:57 +00:00
parent 4f27af39d3
commit 9ad858c9c9
63 changed files with 459 additions and 437 deletions

View File

@@ -26,7 +26,7 @@ from cinder.brick.initiator import host_driver
from cinder.brick.initiator import linuxfc
from cinder.brick.initiator import linuxscsi
from cinder.brick.remotefs import remotefs
from cinder.i18n import _, _LE
from cinder.i18n import _, _LE, _LW
from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
@@ -227,8 +227,8 @@ class ISCSIConnector(InitiatorConnector):
if tries >= self.device_scan_attempts:
raise exception.VolumeDeviceNotFound(device=host_device)
LOG.warn(_("ISCSI volume not yet found at: %(host_device)s. "
"Will rescan & retry. Try number: %(tries)s"),
LOG.warn(_LW("ISCSI volume not yet found at: %(host_device)s. "
"Will rescan & retry. Try number: %(tries)s"),
{'host_device': host_device,
'tries': tries})
@@ -634,8 +634,8 @@ class FibreChannelConnector(InitiatorConnector):
LOG.error(msg)
raise exception.NoFibreChannelVolumeDeviceFound()
LOG.warn(_("Fibre volume not yet found. "
"Will rescan & retry. Try number: %(tries)s"),
LOG.warn(_LW("Fibre volume not yet found. "
"Will rescan & retry. Try number: %(tries)s"),
{'tries': tries})
self._linuxfc.rescan_hosts(hbas)
@@ -778,8 +778,8 @@ class AoEConnector(InitiatorConnector):
if waiting_status['tries'] >= self.device_scan_attempts:
raise exception.VolumeDeviceNotFound(device=aoe_path)
LOG.warn(_("AoE volume not yet found at: %(path)s. "
"Try number: %(tries)s"),
LOG.warn(_LW("AoE volume not yet found at: %(path)s. "
"Try number: %(tries)s"),
{'path': aoe_device,
'tries': waiting_status['tries']})
@@ -860,8 +860,8 @@ class RemoteFsConnector(InitiatorConnector):
kwargs.get('glusterfs_mount_point_base') or\
mount_point_base
else:
LOG.warn(_("Connection details not present."
" RemoteFsClient may not initialize properly."))
LOG.warn(_LW("Connection details not present."
" RemoteFsClient may not initialize properly."))
self._remotefsclient = remotefs.RemoteFsClient(mount_type, root_helper,
execute=execute,
*args, **kwargs)

View File

@@ -19,7 +19,7 @@ import errno
from oslo.concurrency import processutils as putils
from cinder.brick.initiator import linuxscsi
from cinder.i18n import _
from cinder.i18n import _LW
from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
@@ -48,13 +48,13 @@ class LinuxFibreChannel(linuxscsi.LinuxSCSI):
# and systool is not installed
# 96 = nova.cmd.rootwrap.RC_NOEXECFOUND:
if exc.exit_code == 96:
LOG.warn(_("systool is not installed"))
LOG.warn(_LW("systool is not installed"))
return []
except OSError as exc:
# This handles the case where rootwrap is NOT used
# and systool is not installed
if exc.errno == errno.ENOENT:
LOG.warn(_("systool is not installed"))
LOG.warn(_LW("systool is not installed"))
return []
# No FC HBAs were found

View File

@@ -22,7 +22,7 @@ import re
from oslo.concurrency import processutils as putils
from cinder.brick import executor
from cinder.i18n import _
from cinder.i18n import _, _LW
from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
@@ -115,7 +115,7 @@ class LinuxSCSI(executor.Executor):
self._execute('multipath', '-f', device, run_as_root=True,
root_helper=self._root_helper)
except putils.ProcessExecutionError as exc:
LOG.warn(_("multipath call failed exit (%(code)s)")
LOG.warn(_LW("multipath call failed exit (%(code)s)")
% {'code': exc.exit_code})
def flush_multipath_devices(self):
@@ -123,7 +123,7 @@ class LinuxSCSI(executor.Executor):
self._execute('multipath', '-F', run_as_root=True,
root_helper=self._root_helper)
except putils.ProcessExecutionError as exc:
LOG.warn(_("multipath call failed exit (%(code)s)")
LOG.warn(_LW("multipath call failed exit (%(code)s)")
% {'code': exc.exit_code})
def find_multipath_device(self, device):
@@ -140,7 +140,7 @@ class LinuxSCSI(executor.Executor):
run_as_root=True,
root_helper=self._root_helper)
except putils.ProcessExecutionError as exc:
LOG.warn(_("multipath call failed exit (%(code)s)")
LOG.warn(_LW("multipath call failed exit (%(code)s)")
% {'code': exc.exit_code})
return None
@@ -163,7 +163,7 @@ class LinuxSCSI(executor.Executor):
mdev_id = mdev_id.replace(')', '')
if mdev is None:
LOG.warn(_("Couldn't find multipath device %(line)s")
LOG.warn(_LW("Couldn't find multipath device %(line)s")
% {'line': line})
return None

View File

@@ -82,7 +82,7 @@ class LVM(executor.Executor):
raise exception.VolumeGroupCreationFailed(vg_name=self.vg_name)
if self._vg_exists() is False:
LOG.error(_('Unable to locate Volume Group %s') % vg_name)
LOG.error(_LE('Unable to locate Volume Group %s') % vg_name)
raise exception.VolumeGroupNotFound(vg_name=vg_name)
# NOTE: we assume that the VG has been activated outside of Cinder
@@ -396,7 +396,7 @@ class LVM(executor.Executor):
vg_list = self.get_all_volume_groups(self._root_helper, self.vg_name)
if len(vg_list) != 1:
LOG.error(_('Unable to find VG: %s') % self.vg_name)
LOG.error(_LE('Unable to find VG: %s') % self.vg_name)
raise exception.VolumeGroupNotFound(vg_name=self.vg_name)
self.vg_size = float(vg_list[0]['size'])
@@ -448,9 +448,9 @@ class LVM(executor.Executor):
"""
if not self.supports_thin_provisioning(self._root_helper):
LOG.error(_('Requested to setup thin provisioning, '
'however current LVM version does not '
'support it.'))
LOG.error(_LE('Requested to setup thin provisioning, '
'however current LVM version does not '
'support it.'))
return None
if name is None:
@@ -521,7 +521,7 @@ class LVM(executor.Executor):
"""
source_lvref = self.get_volume(source_lv_name)
if source_lvref is None:
LOG.error(_("Trying to create snapshot by non-existent LV: %s")
LOG.error(_LE("Trying to create snapshot by non-existent LV: %s")
% source_lv_name)
raise exception.VolumeDeviceNotFound(device=source_lv_name)
cmd = ['lvcreate', '--name', name,