Remove log translations

Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I763eb2a223395374dd113f0bc2b13130f654f650
This commit is contained in:
gaozx 2017-03-21 03:35:37 -04:00
parent 9cacc64c59
commit a951ea7533

View File

@ -32,8 +32,6 @@ from ironic.common import dhcp_factory
from ironic.common import exception from ironic.common import exception
from ironic.common.glance_service import service_utils from ironic.common.glance_service import service_utils
from ironic.common.i18n import _ from ironic.common.i18n import _
from ironic.common.i18n import _LE
from ironic.common.i18n import _LI
from ironic.common import image_service from ironic.common import image_service
from ironic.common import keystone from ironic.common import keystone
from ironic.common import pxe_utils from ironic.common import pxe_utils
@ -197,10 +195,10 @@ def build_instance_info_for_deploy(task):
image_service.HttpImageService().validate_href(image_source) image_service.HttpImageService().validate_href(image_source)
except exception.ImageRefValidationFailed: except exception.ImageRefValidationFailed:
with excutils.save_and_reraise_exception(): with excutils.save_and_reraise_exception():
LOG.error(_LE("Agent deploy supports only HTTP(S) URLs as " LOG.error("Agent deploy supports only HTTP(S) URLs as "
"instance_info['image_source']. Either %s " "instance_info['image_source']. Either %s "
"is not a valid HTTP(S) URL or " "is not a valid HTTP(S) URL or "
"is not reachable."), image_source) "is not reachable.", image_source)
instance_info['image_url'] = image_source instance_info['image_url'] = image_source
return instance_info return instance_info
@ -222,10 +220,10 @@ def _create_rootfs_link(task):
image_service.HttpImageService().validate_href(rootfs) image_service.HttpImageService().validate_href(rootfs)
except exception.ImageRefValidationFailed: except exception.ImageRefValidationFailed:
with excutils.save_and_reraise_exception(): with excutils.save_and_reraise_exception():
LOG.error(_LE("Agent deploy supports only HTTP URLs as " LOG.error("Agent deploy supports only HTTP URLs as "
"driver_info['deploy_squashfs']. Either %s " "driver_info['deploy_squashfs']. Either %s "
"is not a valid HTTP URL or " "is not a valid HTTP URL or "
"is not reachable."), rootfs) "is not reachable.", rootfs)
return rootfs return rootfs
@ -488,8 +486,8 @@ class FuelAgentVendor(base.VendorInterface):
agent_status = kwargs.get('status') agent_status = kwargs.get('status')
if agent_status != 'ready': if agent_status != 'ready':
LOG.error(_LE('Deploy failed for node %(node)s. Fuel Agent is not ' LOG.error('Deploy failed for node %(node)s. Fuel Agent is not '
'in ready state, error: %(error)s'), {'node': node.uuid, 'in ready state, error: %(error)s', {'node': node.uuid,
'error': kwargs.get('error_message')}) 'error': kwargs.get('error_message')})
deploy_utils.set_failed_state(task, err_msg) deploy_utils.set_failed_state(task, err_msg)
return return
@ -522,7 +520,7 @@ class FuelAgentVendor(base.VendorInterface):
_sftp_upload(sftp, configdrive, '/tmp/config-drive.img') _sftp_upload(sftp, configdrive, '/tmp/config-drive.img')
_ssh_execute(ssh, cmd, params) _ssh_execute(ssh, cmd, params)
LOG.info(_LI('Fuel Agent pass on node %s'), node.uuid) LOG.info('Fuel Agent pass on node %s', node.uuid)
manager_utils.node_set_boot_device(task, boot_devices.DISK, manager_utils.node_set_boot_device(task, boot_devices.DISK,
persistent=True) persistent=True)
manager_utils.node_power_action(task, states.REBOOT) manager_utils.node_power_action(task, states.REBOOT)
@ -533,4 +531,4 @@ class FuelAgentVendor(base.VendorInterface):
deploy_utils.set_failed_state(task, msg) deploy_utils.set_failed_state(task, msg)
else: else:
task.process_event('done') task.process_event('done')
LOG.info(_LI('Deployment to node %s done'), task.node.uuid) LOG.info('Deployment to node %s done', task.node.uuid)