diff options
Diffstat (limited to 'ironic/drivers/modules/ilo/power.py')
-rw-r--r-- | ironic/drivers/modules/ilo/power.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ironic/drivers/modules/ilo/power.py b/ironic/drivers/modules/ilo/power.py index bf1d73181..b799fb69a 100644 --- a/ironic/drivers/modules/ilo/power.py +++ b/ironic/drivers/modules/ilo/power.py @@ -21,6 +21,7 @@ from oslo.utils import importutils from ironic.common import exception from ironic.common.i18n import _ +from ironic.common.i18n import _LE from ironic.common import states from ironic.conductor import task_manager from ironic.drivers import base @@ -79,8 +80,8 @@ def _get_power_state(node): power_status = ilo_object.get_host_power_status() except ilo_client.IloError as ilo_exception: - LOG.error(_("iLO get_power_state failed for node %(node_id)s with " - "error: %(error)s."), + LOG.error(_LE("iLO get_power_state failed for node %(node_id)s with " + "error: %(error)s."), {'node_id': node.uuid, 'error': ilo_exception}) operation = _('iLO get_power_status') raise exception.IloOperationError(operation=operation, @@ -151,8 +152,8 @@ def _set_power_state(task, target_state): raise exception.InvalidParameterValue(msg) except ilo_client.IloError as ilo_exception: - LOG.error(_("iLO set_power_state failed to set state to %(tstate)s " - " for node %(node_id)s with error: %(error)s"), + LOG.error(_LE("iLO set_power_state failed to set state to %(tstate)s " + " for node %(node_id)s with error: %(error)s"), {'tstate': target_state, 'node_id': node.uuid, 'error': ilo_exception}) operation = _('iLO set_power_state') @@ -164,8 +165,8 @@ def _set_power_state(task, target_state): if state != target_state: timeout = (CONF.ilo.power_wait) * (CONF.ilo.power_retry) - LOG.error(_("iLO failed to change state to %(tstate)s " - "within %(timeout)s sec"), + LOG.error(_LE("iLO failed to change state to %(tstate)s " + "within %(timeout)s sec"), {'tstate': target_state, 'timeout': timeout}) raise exception.PowerStateFailure(pstate=target_state) |