Merge "Logging not using oslo.i18n guidelines (openstack)"

This commit is contained in:
Jenkins 2015-05-13 13:12:12 +00:00 committed by Gerrit Code Review
commit 7a9afae72d
3 changed files with 6 additions and 14 deletions

View File

@ -211,14 +211,6 @@ def check_assert_called_once(logical_line, filename):
def validate_log_translations(logical_line, filename):
# TODO(smcginnis): The following is temporary as a series
# of patches are done to address these issues. It should be
# removed completely when bug 1433216 is closed.
ignore_dirs = ["cinder/openstack"]
for directory in ignore_dirs:
if directory in filename:
return
# Translations are not required in the test directory.
# This will not catch all instances of violations, just direct
# misuse of the form LOG.info('Message').

View File

@ -245,8 +245,8 @@ class DellEQLSanISCSIDriver(san.SanISCSIDriver):
return self._ssh_execute(
ssh, command,
timeout=self.configuration.eqlx_cli_timeout)
except Exception as e:
LOG.exception(e)
except Exception:
LOG.exception(_LE('Error running command.'))
greenthread.sleep(random.randint(20, 500) / 100.0)
msg = (_("SSH Command failed after '%(total_attempts)r' "
"attempts : '%(command)s'") %

View File

@ -33,7 +33,7 @@ LOG = logging.getLogger(__name__)
def map_volume_to_single_host(client, volume, eseries_vol, host,
vol_map):
"""Maps the e-series volume to host with initiator."""
LOG.debug("Attempting to map volume %s to single host." % volume['id'])
LOG.debug("Attempting to map volume %s to single host.", volume['id'])
# If volume is not mapped on the backend, map directly to host
if not vol_map:
@ -56,8 +56,8 @@ def map_volume_to_single_host(client, volume, eseries_vol, host,
# Volume is mapped to the multiattach host group
if vol_map.get('mapRef') == multiattach_cluster_ref:
LOG.debug("Volume %s is mapped to multiattach host group."
% volume['id'])
LOG.debug("Volume %s is mapped to multiattach host group.",
volume['id'])
# If volume is not currently attached according to Cinder, it is
# safe to delete the mapping
@ -84,7 +84,7 @@ def map_volume_to_multiple_hosts(client, volume, eseries_vol, target_host,
mapping):
"""Maps the e-series volume to multiattach host group."""
LOG.debug("Attempting to map volume %s to multiple hosts." % volume['id'])
LOG.debug("Attempting to map volume %s to multiple hosts.", volume['id'])
# If volume is already mapped to desired host, return the mapping
if mapping['mapRef'] == target_host['hostRef']: