Remove translation of log messages from ironic/drivers/modules/ucs

i18n team has decided not to translate the logs because it seems
like it's not very useful. Removed translation of log messages
from ironic/drivers/modules/ucs

Change-Id: I68cb6f1b91588d4facd8ffed3fc9612e13f529a2
Partial-Bug: #1674374
This commit is contained in:
Ngo Quoc Cuong 2017-04-25 19:00:25 +07:00
parent 9558eb85e7
commit 4e6b834777
3 changed files with 20 additions and 20 deletions

View File

@ -21,7 +21,7 @@ from oslo_utils import importutils
import six
from ironic.common import exception
from ironic.common.i18n import _, _LE
from ironic.common.i18n import _
from ironic.drivers.modules import deploy_utils
ucs_helper = importutils.try_import('UcsSdk.utils.helper')
@ -114,8 +114,8 @@ class CiscoUcsHelper(object):
self.username,
self.password)
except ucs_error.UcsConnectionError as ucs_exception:
LOG.error(_LE("Cisco client: service unavailable for node "
"%(uuid)s."), {'uuid': self.uuid})
LOG.error("Cisco client: service unavailable for node "
"%(uuid)s.", {'uuid': self.uuid})
raise exception.UcsConnectionError(error=ucs_exception,
node=self.uuid)

View File

@ -23,7 +23,7 @@ from oslo_utils import importutils
from ironic.common import boot_devices
from ironic.common import exception
from ironic.common.i18n import _, _LE
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules.ucs import helper as ucs_helper
@ -92,8 +92,8 @@ class UcsManagement(base.ManagementInterface):
mgmt_handle = ucs_mgmt.BootDeviceHelper(helper)
mgmt_handle.set_boot_device(device, persistent)
except ucs_error.UcsOperationError as ucs_exception:
LOG.error(_LE("%(driver)s: client failed to set boot device "
"%(device)s for node %(uuid)s."),
LOG.error("%(driver)s: client failed to set boot device "
"%(device)s for node %(uuid)s.",
{'driver': task.node.driver, 'device': device,
'uuid': task.node.uuid})
operation = _('setting boot device')
@ -127,8 +127,8 @@ class UcsManagement(base.ManagementInterface):
mgmt_handle = ucs_mgmt.BootDeviceHelper(helper)
boot_device = mgmt_handle.get_boot_device()
except ucs_error.UcsOperationError as ucs_exception:
LOG.error(_LE("%(driver)s: client failed to get boot device for "
"node %(uuid)s."),
LOG.error("%(driver)s: client failed to get boot device for "
"node %(uuid)s.",
{'driver': task.node.driver, 'uuid': task.node.uuid})
operation = _('getting boot device')
raise exception.UcsOperationError(operation=operation,

View File

@ -22,7 +22,7 @@ from oslo_service import loopingcall
from oslo_utils import importutils
from ironic.common import exception
from ironic.common.i18n import _, _LE
from ironic.common.i18n import _
from ironic.common import states
from ironic.conductor import task_manager
from ironic.conf import CONF
@ -108,8 +108,8 @@ class Power(base.PowerInterface):
power_handle = ucs_power.UcsPower(helper)
power_status = power_handle.get_power_state()
except ucs_error.UcsOperationError as ucs_exception:
LOG.error(_LE("%(driver)s: get_power_state operation failed for "
"node %(uuid)s with error: %(msg)s."),
LOG.error("%(driver)s: get_power_state operation failed for "
"node %(uuid)s with error: %(msg)s.",
{'driver': task.node.driver, 'uuid': task.node.uuid,
'msg': ucs_exception})
operation = _('getting power status')
@ -150,8 +150,8 @@ class Power(base.PowerInterface):
else:
return
except ucs_error.UcsOperationError as ucs_exception:
LOG.error(_LE("%(driver)s: set_power_state operation failed for "
"node %(uuid)s with error: %(msg)s."),
LOG.error("%(driver)s: set_power_state operation failed for "
"node %(uuid)s with error: %(msg)s.",
{'driver': task.node.driver, 'uuid': task.node.uuid,
'msg': ucs_exception})
operation = _("setting power status")
@ -161,9 +161,9 @@ class Power(base.PowerInterface):
state = _wait_for_state_change(pstate, ucs_power_handle)
if state != pstate:
timeout = CONF.cisco_ucs.action_interval * CONF.cisco_ucs.max_retry
LOG.error(_LE("%(driver)s: driver failed to change node %(uuid)s "
"power state to %(state)s within %(timeout)s "
"seconds."),
LOG.error("%(driver)s: driver failed to change node %(uuid)s "
"power state to %(state)s within %(timeout)s "
"seconds.",
{'driver': task.node.driver, 'uuid': task.node.uuid,
'state': pstate, 'timeout': timeout})
raise exception.PowerStateFailure(pstate=pstate)
@ -183,8 +183,8 @@ class Power(base.PowerInterface):
ucs_power_handle = ucs_power.UcsPower(helper)
ucs_power_handle.reboot()
except ucs_error.UcsOperationError as ucs_exception:
LOG.error(_LE("%(driver)s: driver failed to reset node %(uuid)s "
"power state."),
LOG.error("%(driver)s: driver failed to reset node %(uuid)s "
"power state.",
{'driver': task.node.driver, 'uuid': task.node.uuid})
operation = _("rebooting")
raise exception.UcsOperationError(operation=operation,
@ -194,8 +194,8 @@ class Power(base.PowerInterface):
state = _wait_for_state_change(states.POWER_ON, ucs_power_handle)
if state != states.POWER_ON:
timeout = CONF.cisco_ucs.action_interval * CONF.cisco_ucs.max_retry
LOG.error(_LE("%(driver)s: driver failed to reboot node %(uuid)s "
"within %(timeout)s seconds."),
LOG.error("%(driver)s: driver failed to reboot node %(uuid)s "
"within %(timeout)s seconds.",
{'driver': task.node.driver,
'uuid': task.node.uuid, 'timeout': timeout})
raise exception.PowerStateFailure(pstate=states.POWER_ON)