diff --git a/sahara/utils/openstack/cinder.py b/sahara/utils/openstack/cinder.py index 339d3f03..fc726d55 100644 --- a/sahara/utils/openstack/cinder.py +++ b/sahara/utils/openstack/cinder.py @@ -21,7 +21,7 @@ from oslo_config import cfg from oslo_log import log as logging from sahara import context -from sahara.i18n import _ +from sahara.i18n import _LW from sahara.utils.openstack import base @@ -50,14 +50,14 @@ CONF.register_opts(opts, group=cinder_group) def validate_config(): if CONF.cinder.api_version == 1: - LOG.warn(_('The Cinder v1 API is deprecated and will be removed after ' - 'the Juno release. You should set cinder.api_version=2 in ' - 'your sahara.conf file.')) + LOG.warn(_LW('The Cinder v1 API is deprecated and will be removed ' + 'after the Juno release. You should set ' + 'cinder.api_version=2 in your sahara.conf file.')) elif CONF.cinder.api_version != 2: - LOG.warn(_('Unsupported Cinder API version: %(bad)s. Please set a ' - 'correct value for cinder.api_version in your sahara.conf ' - 'file (currently supported versions are: %(supported)s). ' - 'Falling back to Cinder API version 2.'), + LOG.warn(_LW('Unsupported Cinder API version: %(bad)s. Please set a ' + 'correct value for cinder.api_version in your sahara.conf' + ' file (currently supported versions are: %(supported)s).' + ' Falling back to Cinder API version 2.'), {'bad': CONF.cinder.api_version, 'supported': [1, 2]}) CONF.set_override('api_version', 2, group='cinder') diff --git a/sahara/utils/proxy.py b/sahara/utils/proxy.py index 544ef973..787a267e 100644 --- a/sahara/utils/proxy.py +++ b/sahara/utils/proxy.py @@ -263,7 +263,7 @@ def proxy_user_create(username): domain = domain_for_proxy() password = six.text_type(uuid.uuid4()) admin.users.create(name=username, password=password, domain=domain.id) - LOG.debug(_('created proxy user {0}').format(username)) + LOG.debug('created proxy user {0}'.format(username)) return password diff --git a/sahara/utils/ssh_remote.py b/sahara/utils/ssh_remote.py index 7a223628..19b53ef6 100644 --- a/sahara/utils/ssh_remote.py +++ b/sahara/utils/ssh_remote.py @@ -571,7 +571,7 @@ class InstanceInteropHelper(remote.Remote): try: command = command.format(**keywords) except KeyError as e: - LOG.error(_('Invalid keyword in proxy_command: %s'), str(e)) + LOG.error(_LE('Invalid keyword in proxy_command: %s'), str(e)) # Do not give more details to the end-user raise ex.SystemError('Misconfiguration') if rootwrap_command: