summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorliyi <liyi8611@gmail.com>2017-03-21 12:17:51 +0800
committerliyi <liyi8611@gmail.com>2017-03-25 17:11:50 +0800
commit8f10215ffde82b9ba1e0da28c70078953b61a9c8 (patch)
tree79b2edced88d836ee95cc3625e9f8ef5d892096b /contrib
parent34df3cd9150c56a4b8f6532ccfbff6859b947cf2 (diff)
downloadheat-8f10215ffde82b9ba1e0da28c70078953b61a9c8.tar.gz
Remove log translations
Log messages are no longer being translated. This removes all use of the _LE, _LI, and _LW translation markers to simplify logging and to avoid confusion with new contributions. See: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Change-Id: Ieec8028305099422e1b0f8fc84bc90c9ca6c694f
Diffstat (limited to 'contrib')
-rw-r--r--contrib/heat_docker/heat_docker/resources/docker_container.py5
-rw-r--r--contrib/rackspace/heat_keystoneclient_v2/client.py23
-rw-r--r--contrib/rackspace/rackspace/clients.py8
-rw-r--r--contrib/rackspace/rackspace/resources/cloud_loadbalancer.py3
-rw-r--r--contrib/rackspace/rackspace/resources/cloud_server.py3
-rw-r--r--contrib/rackspace/rackspace/resources/cloudnetworks.py7
6 files changed, 20 insertions, 29 deletions
diff --git a/contrib/heat_docker/heat_docker/resources/docker_container.py b/contrib/heat_docker/heat_docker/resources/docker_container.py
index 44144e772..3c0368b90 100644
--- a/contrib/heat_docker/heat_docker/resources/docker_container.py
+++ b/contrib/heat_docker/heat_docker/resources/docker_container.py
@@ -21,7 +21,6 @@ import six
from heat.common import exception
from heat.common.i18n import _
-from heat.common.i18n import _LW
from heat.engine import attributes
from heat.engine import constraints
from heat.engine import properties
@@ -554,8 +553,8 @@ def available_resource_mapping():
if DOCKER_INSTALLED:
return resource_mapping()
else:
- LOG.warning(_LW("Docker plug-in loaded, but docker lib "
- "not installed."))
+ LOG.warning("Docker plug-in loaded, but docker lib "
+ "not installed.")
return {}
diff --git a/contrib/rackspace/heat_keystoneclient_v2/client.py b/contrib/rackspace/heat_keystoneclient_v2/client.py
index c7b6d8b14..ee3f58ecf 100644
--- a/contrib/rackspace/heat_keystoneclient_v2/client.py
+++ b/contrib/rackspace/heat_keystoneclient_v2/client.py
@@ -21,12 +21,9 @@ from oslo_log import log as logging
from oslo_utils import importutils
from heat.common import exception
-from heat.common.i18n import _LE
-from heat.common.i18n import _LI
-from heat.common.i18n import _LW
LOG = logging.getLogger('heat.common.keystoneclient')
-LOG.info(_LI("Keystone V2 loaded"))
+LOG.info("Keystone V2 loaded")
class KeystoneClientV2(object):
@@ -100,8 +97,8 @@ class KeystoneClientV2(object):
kwargs['tenant_name'] = self.context.project_name
kwargs['tenant_id'] = self.context.tenant_id
else:
- LOG.error(_LE("Keystone v2 API connection failed, no password "
- "or auth_token!"))
+ LOG.error("Keystone v2 API connection failed, no password "
+ "or auth_token!")
raise exception.AuthorizationFailure()
kwargs['cacert'] = self._get_client_option('ca_file')
kwargs['insecure'] = self._get_client_option('insecure')
@@ -115,7 +112,7 @@ class KeystoneClientV2(object):
if auth_kwargs:
# Sanity check
if not client.auth_ref.trust_scoped:
- LOG.error(_LE("v2 trust token re-scoping failed!"))
+ LOG.error("v2 trust token re-scoping failed!")
raise exception.AuthorizationFailure()
# All OK so update the context with the token
self.context.auth_token = client.auth_ref.auth_token
@@ -123,8 +120,8 @@ class KeystoneClientV2(object):
# Ensure the v2 API we're using is not impacted by keystone
# bug #1239303, otherwise we can't trust the user_id
if self.context.trustor_user_id != client.auth_ref.user_id:
- LOG.error(_LE("Trust impersonation failed, bug #1239303 "
- "suspected, you may need a newer keystone"))
+ LOG.error("Trust impersonation failed, bug #1239303 "
+ "suspected, you may need a newer keystone")
raise exception.AuthorizationFailure()
return client
@@ -164,8 +161,8 @@ class KeystoneClientV2(object):
Returns the keystone ID of the resulting user
"""
if len(username) > 64:
- LOG.warning(_LW("Truncating the username %s to the last 64 "
- "characters."), username)
+ LOG.warning("Truncating the username %s to the last 64 "
+ "characters.", username)
# get the last 64 characters of the username
username = username[-64:]
user = self.client.users.create(username,
@@ -188,8 +185,8 @@ class KeystoneClientV2(object):
self.client.roles.add_user_role(user.id, role_id,
self.context.tenant_id)
else:
- LOG.error(_LE("Failed to add user %(user)s to role %(role)s, "
- "check role exists!"),
+ LOG.error("Failed to add user %(user)s to role %(role)s, "
+ "check role exists!",
{'user': username,
'role': cfg.CONF.heat_stack_user_role})
diff --git a/contrib/rackspace/rackspace/clients.py b/contrib/rackspace/rackspace/clients.py
index 9e0f5c2ec..ffc745982 100644
--- a/contrib/rackspace/rackspace/clients.py
+++ b/contrib/rackspace/rackspace/clients.py
@@ -25,8 +25,6 @@ from swiftclient import utils as swiftclient_utils
from troveclient import client as tc
from heat.common import exception
-from heat.common.i18n import _LI
-from heat.common.i18n import _LW
from heat.engine.clients import client_plugin
from heat.engine.clients.os import cinder
from heat.engine.clients.os import glance
@@ -57,7 +55,7 @@ class RackspaceClientPlugin(client_plugin.ClientPlugin):
"""Create an authenticated client context."""
self.pyrax = pyrax.create_context("rackspace")
self.pyrax.auth_endpoint = self.context.auth_url
- LOG.info(_LI("Authenticating username: %s"),
+ LOG.info("Authenticating username: %s",
self.context.username)
tenant = self.context.tenant_id
tenant_name = self.context.tenant
@@ -65,9 +63,9 @@ class RackspaceClientPlugin(client_plugin.ClientPlugin):
tenant_id=tenant,
tenant_name=tenant_name)
if not self.pyrax.authenticated:
- LOG.warning(_LW("Pyrax Authentication Failed."))
+ LOG.warning("Pyrax Authentication Failed.")
raise exception.AuthorizationFailure()
- LOG.info(_LI("User %s authenticated successfully."),
+ LOG.info("User %s authenticated successfully.",
self.context.username)
diff --git a/contrib/rackspace/rackspace/resources/cloud_loadbalancer.py b/contrib/rackspace/rackspace/resources/cloud_loadbalancer.py
index 0e4fc400d..1205defe9 100644
--- a/contrib/rackspace/rackspace/resources/cloud_loadbalancer.py
+++ b/contrib/rackspace/rackspace/resources/cloud_loadbalancer.py
@@ -19,7 +19,6 @@ import six
from heat.common import exception
from heat.common.i18n import _
-from heat.common.i18n import _LI
from heat.engine import attributes
from heat.engine import constraints
from heat.engine import function
@@ -1184,7 +1183,7 @@ class CloudLoadBalancer(resource.Resource):
raise exception.InvalidTemplateAttribute(resource=self.name,
key=key)
function = attribute_function[key]
- LOG.info(_LI('%(name)s.GetAtt(%(key)s) == %(function)s'),
+ LOG.info('%(name)s.GetAtt(%(key)s) == %(function)s',
{'name': self.name, 'key': key, 'function': function})
return function
diff --git a/contrib/rackspace/rackspace/resources/cloud_server.py b/contrib/rackspace/rackspace/resources/cloud_server.py
index 710a5835e..b76a1bfc2 100644
--- a/contrib/rackspace/rackspace/resources/cloud_server.py
+++ b/contrib/rackspace/rackspace/resources/cloud_server.py
@@ -17,7 +17,6 @@ from oslo_log import log as logging
from heat.common import exception
from heat.common.i18n import _
-from heat.common.i18n import _LW
from heat.engine import constraints
from heat.engine import properties
from heat.engine.resources.openstack.nova import server
@@ -187,7 +186,7 @@ class CloudServer(server.Server):
reason = server.metadata.get('rackconnect_unprocessable_reason',
None)
if reason is not None:
- LOG.warning(_LW("RackConnect unprocessable reason: %s"),
+ LOG.warning("RackConnect unprocessable reason: %s",
reason)
msg = _("RackConnect automation has completed")
diff --git a/contrib/rackspace/rackspace/resources/cloudnetworks.py b/contrib/rackspace/rackspace/resources/cloudnetworks.py
index 8fd14479e..ef7cc60c7 100644
--- a/contrib/rackspace/rackspace/resources/cloudnetworks.py
+++ b/contrib/rackspace/rackspace/resources/cloudnetworks.py
@@ -15,7 +15,6 @@ from oslo_log import log as logging
import six
from heat.common.i18n import _
-from heat.common.i18n import _LW
from heat.engine import attributes
from heat.engine import constraints
from heat.engine import properties
@@ -108,8 +107,8 @@ class CloudNetwork(resource.Resource):
try:
self._network = self.cloud_networks().get(self.resource_id)
except NotFound:
- LOG.warning(_LW("Could not find network %s but resource id is"
- " set."), self.resource_id)
+ LOG.warning("Could not find network %s but resource id is"
+ " set.", self.resource_id)
return self._network
def cloud_networks(self):
@@ -139,7 +138,7 @@ class CloudNetwork(resource.Resource):
try:
network.delete()
except NetworkInUse:
- LOG.warning(_LW("Network '%s' still in use."), network.id)
+ LOG.warning("Network '%s' still in use.", network.id)
else:
self._delete_issued = True
return False