summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/ssh.py
diff options
context:
space:
mode:
authorVladyslav Drok <vdrok@mirantis.com>2014-09-03 11:42:53 +0300
committerVladyslav Drok <vdrok@mirantis.com>2014-09-09 14:19:42 +0300
commit4676a47697fb419aacd8248c662556e6952935d6 (patch)
tree3215e6e72c1fc0cb997ed7690793e683f5bf462b /ironic/drivers/modules/ssh.py
parent5bdcb19b20704238cb48fb0a615f503ee09d024e (diff)
downloadironic-4676a47697fb419aacd8248c662556e6952935d6.tar.gz
Translator functions cleanup part 2
This part fixes ironic/drivers folder. Some modules use _ function for log translation, even when the translated string is passed to e.g. LOG.warn function. This patch fixes it, using translator functions appropriate for corresponding log levels. Translator functions, imported from ironic.openstack.common.gettextutils are now imported from ironic.common.i18n. Translator functions are imported the same way across all modules. All places that are changed conform to http://docs.openstack.org/developer/oslo.i18n/guidelines.html Partial-bug: #1364813 Change-Id: I77cf2582d2e9173d57da473cba118fd8b48a8735
Diffstat (limited to 'ironic/drivers/modules/ssh.py')
-rw-r--r--ironic/drivers/modules/ssh.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/ironic/drivers/modules/ssh.py b/ironic/drivers/modules/ssh.py
index ebd2f21c4..69877648d 100644
--- a/ironic/drivers/modules/ssh.py
+++ b/ironic/drivers/modules/ssh.py
@@ -32,8 +32,9 @@ from oslo.config import cfg
from ironic.common import boot_devices
from ironic.common import exception
-from ironic.common import i18n
from ironic.common.i18n import _
+from ironic.common.i18n import _LE
+from ironic.common.i18n import _LW
from ironic.common import states
from ironic.common import utils
from ironic.conductor import task_manager
@@ -48,9 +49,6 @@ libvirt_opts = [
help='libvirt uri')
]
-_LW = i18n._LW
-_LE = i18n._LE
-
CONF = cfg.CONF
CONF.register_opts(libvirt_opts, group='ssh')
@@ -367,7 +365,7 @@ def _get_power_status(ssh_obj, driver_info):
if not power_state:
power_state = states.POWER_OFF
else:
- err_msg = _('Node "%(host)s" with MAC address %(mac)s not found.')
+ err_msg = _LE('Node "%(host)s" with MAC address %(mac)s not found.')
LOG.error(err_msg, {'host': driver_info['host'],
'mac': driver_info['macs']})