Merge "Following the hacking rule for string interpolation at logging"
This commit is contained in:
commit
4ffa8d8455
@ -164,8 +164,8 @@ class ConductorManager(base_manager.BaseConductorManager):
|
||||
|
||||
"""
|
||||
LOG.debug("RPC change_node_power_state called for node %(node)s. "
|
||||
"The desired new state is %(state)s."
|
||||
% {'node': node_id, 'state': new_state})
|
||||
"The desired new state is %(state)s.",
|
||||
{'node': node_id, 'state': new_state})
|
||||
|
||||
with task_manager.acquire(context, node_id, shared=False,
|
||||
purpose='changing node power state') as task:
|
||||
@ -1580,8 +1580,7 @@ class ConductorManager(base_manager.BaseConductorManager):
|
||||
async task
|
||||
"""
|
||||
LOG.debug('RPC set_console_mode called for node %(node)s with '
|
||||
'enabled %(enabled)s' % {'node': node_id,
|
||||
'enabled': enabled})
|
||||
'enabled %(enabled)s', {'node': node_id, 'enabled': enabled})
|
||||
|
||||
with task_manager.acquire(context, node_id, shared=False,
|
||||
purpose='setting console mode') as task:
|
||||
@ -2526,8 +2525,8 @@ def _do_inspect_hardware(task):
|
||||
|
||||
if new_state == states.MANAGEABLE:
|
||||
task.process_event('done')
|
||||
LOG.info(_LI('Successfully inspected node %(node)s')
|
||||
% {'node': node.uuid})
|
||||
LOG.info(_LI('Successfully inspected node %(node)s'),
|
||||
{'node': node.uuid})
|
||||
elif new_state != states.INSPECTING:
|
||||
error = (_("During inspection, driver returned unexpected "
|
||||
"state %(state)s") % {'state': new_state})
|
||||
|
@ -708,7 +708,7 @@ def verify_image_checksum(image_location, expected_checksum):
|
||||
LOG.error(_LE("Error opening file: %(file)s"),
|
||||
{'file': image_location})
|
||||
raise exception.ImageRefValidationFailed(image_href=image_location,
|
||||
reason=six.text_type(e))
|
||||
reason=e)
|
||||
|
||||
if actual_checksum != expected_checksum:
|
||||
msg = (_('Error verifying image checksum. Image %(image)s failed to '
|
||||
|
@ -24,7 +24,6 @@ import re
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import loopingcall
|
||||
from oslo_utils import importutils
|
||||
import six
|
||||
from six.moves.urllib import parse as urlparse
|
||||
|
||||
from ironic.common import boot_devices
|
||||
@ -564,7 +563,7 @@ class Management(base.ManagementInterface):
|
||||
LOG.error(_LE("Seamicro set boot device failed for node "
|
||||
"%(node)s with the following error: %(error)s"),
|
||||
{'node': task.node.uuid, 'error': ex})
|
||||
raise exception.IronicException(message=six.text_type(ex))
|
||||
raise exception.IronicException(ex)
|
||||
|
||||
def get_boot_device(self, task):
|
||||
"""Get the current boot device for the task's node.
|
||||
|
Loading…
x
Reference in New Issue
Block a user