all non debug log messages should be translated
Updated a set of files to add missing translation support in the log messages. Change-Id: I58d561c5e1ecff550483ee0be696999e927c98ad Partial-Bug: #1321283
This commit is contained in:
parent
40c8de0c3f
commit
105a806493
@ -57,7 +57,8 @@ if __name__ == '__main__':
|
||||
|
||||
port = cfg.CONF.heat_api.bind_port
|
||||
host = cfg.CONF.heat_api.bind_host
|
||||
LOG.info('Starting Heat ReST API on %s:%s' % (host, port))
|
||||
LOG.info(_('Starting Heat ReST API on %(host)s:%(port)s'),
|
||||
{'host': host, 'port': port})
|
||||
server = wsgi.Server()
|
||||
server.start(app, cfg.CONF.heat_api, default_port=port)
|
||||
notify.startup_notify(cfg.CONF.onready)
|
||||
|
@ -59,7 +59,8 @@ if __name__ == '__main__':
|
||||
|
||||
port = cfg.CONF.heat_api_cfn.bind_port
|
||||
host = cfg.CONF.heat_api_cfn.bind_host
|
||||
LOG.info('Starting Heat API on %s:%s' % (host, port))
|
||||
LOG.info(_('Starting Heat API on %(host)s:%(port)s'),
|
||||
{'host': host, 'port': port})
|
||||
server = wsgi.Server()
|
||||
server.start(app, cfg.CONF.heat_api_cfn, default_port=port)
|
||||
notify.startup_notify(cfg.CONF.onready)
|
||||
|
@ -59,7 +59,8 @@ if __name__ == '__main__':
|
||||
|
||||
port = cfg.CONF.heat_api_cloudwatch.bind_port
|
||||
host = cfg.CONF.heat_api_cloudwatch.bind_host
|
||||
LOG.info('Starting Heat CloudWatch API on %s:%s' % (host, port))
|
||||
LOG.info(_('Starting Heat CloudWatch API on %(host)s:%(port)s'),
|
||||
{'host': host, 'port': port})
|
||||
server = wsgi.Server()
|
||||
server.start(app, cfg.CONF.heat_api_cloudwatch, default_port=port)
|
||||
notify.startup_notify(cfg.CONF.onready)
|
||||
|
@ -109,8 +109,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("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
|
||||
|
@ -103,7 +103,7 @@ class NovaFlavor(resource.Resource):
|
||||
self.nova().flavors.delete(self.resource_id)
|
||||
except nova_exceptions.NotFound:
|
||||
LOG.debug(
|
||||
_('Could not find flavor %s.') % self.resource_id)
|
||||
'Could not find flavor %s.' % self.resource_id)
|
||||
|
||||
self.resource_id_set(None)
|
||||
|
||||
|
@ -421,7 +421,7 @@ class StackController(object):
|
||||
msg = _("The Template must be a JSON or YAML document.")
|
||||
return exception.HeatInvalidParameterValueError(detail=msg)
|
||||
|
||||
LOG.info('validate_template')
|
||||
LOG.info(_('validate_template'))
|
||||
|
||||
def format_validate_parameter(key, value):
|
||||
"""
|
||||
|
@ -46,7 +46,7 @@ def call(args):
|
||||
def write(self, data):
|
||||
LOG.info(data)
|
||||
|
||||
LOG.info('%s\n' % ' '.join(args))
|
||||
LOG.info('%s\n', ' '.join(args)) # noqa
|
||||
try:
|
||||
ls = LogStream()
|
||||
p = subprocess.Popen(args, stdout=subprocess.PIPE,
|
||||
@ -57,13 +57,13 @@ def call(args):
|
||||
ls.write(x)
|
||||
except OSError as ex:
|
||||
if ex.errno == errno.ENOEXEC:
|
||||
LOG.error('Userdata empty or not executable: %s\n' % str(ex))
|
||||
LOG.error(_('Userdata empty or not executable: %s'), ex)
|
||||
return os.EX_OK
|
||||
else:
|
||||
LOG.error('OS error running userdata: %s\n' % str(ex))
|
||||
LOG.error(_('OS error running userdata: %s'), ex)
|
||||
return os.EX_OSERR
|
||||
except Exception as ex:
|
||||
LOG.error('Unknown error running userdata: %s\n' % str(ex))
|
||||
LOG.error(_('Unknown error running userdata: %s'), ex)
|
||||
return os.EX_SOFTWARE
|
||||
return p.returncode
|
||||
|
||||
@ -72,16 +72,16 @@ def main():
|
||||
|
||||
if not chk_ci_version():
|
||||
# pre 0.6.0 - user data executed via cloudinit, not this helper
|
||||
LOG.error('Unable to log provisioning, need a newer version of'
|
||||
' cloud-init\n')
|
||||
LOG.error(_('Unable to log provisioning, need a newer version of'
|
||||
' cloud-init'))
|
||||
return -1
|
||||
|
||||
userdata_path = os.path.join(VAR_PATH, 'cfn-userdata')
|
||||
os.chmod(userdata_path, 0o700)
|
||||
|
||||
LOG.info('Provision began: %s\n' % datetime.datetime.now())
|
||||
LOG.info(_('Provision began: %s'), datetime.datetime.now())
|
||||
returncode = call([userdata_path])
|
||||
LOG.info('Provision done: %s\n' % datetime.datetime.now())
|
||||
LOG.info(_('Provision done: %s'), datetime.datetime.now())
|
||||
if returncode:
|
||||
return returncode
|
||||
|
||||
@ -91,7 +91,7 @@ if __name__ == '__main__':
|
||||
|
||||
code = main()
|
||||
if code:
|
||||
LOG.error('Provision failed with exit code %s' % code)
|
||||
LOG.error(_('Provision failed with exit code %s'), code)
|
||||
sys.exit(code)
|
||||
|
||||
provision_log = os.path.join(VAR_PATH, 'provision-finished')
|
||||
|
@ -114,7 +114,7 @@ class HeatException(Exception):
|
||||
#log the issue and the kwargs
|
||||
LOG.exception(_('Exception in string format operation'))
|
||||
for name, value in kwargs.iteritems():
|
||||
LOG.error("%s: %s" % (name, value))
|
||||
LOG.error("%s: %s" % (name, value)) # noqa
|
||||
|
||||
if _FATAL_EXCEPTION_FORMAT_ERRORS:
|
||||
raise exc_info[0], exc_info[1], exc_info[2]
|
||||
|
@ -119,7 +119,7 @@ class KeystoneClientV3(object):
|
||||
if c.authenticate():
|
||||
self._admin_client = c
|
||||
else:
|
||||
LOG.error("Admin client authentication failed")
|
||||
LOG.error(_("Admin client authentication failed"))
|
||||
raise exception.AuthorizationFailure()
|
||||
return self._admin_client
|
||||
|
||||
@ -135,7 +135,7 @@ class KeystoneClientV3(object):
|
||||
if c.authenticate(domain_id=self.stack_domain_id):
|
||||
self._domain_admin_client = c
|
||||
else:
|
||||
LOG.error("Domain admin client authentication failed")
|
||||
LOG.error(_("Domain admin client authentication failed"))
|
||||
raise exception.AuthorizationFailure()
|
||||
return self._domain_admin_client
|
||||
|
||||
@ -178,7 +178,7 @@ class KeystoneClientV3(object):
|
||||
self.context.auth_url = kwargs.get('auth_url')
|
||||
# Sanity check that impersonation is effective
|
||||
if self.context.trustor_user_id != client.auth_ref.user_id:
|
||||
LOG.error("Trust impersonation failed")
|
||||
LOG.error(_("Trust impersonation failed"))
|
||||
raise exception.AuthorizationFailure()
|
||||
|
||||
return client
|
||||
|
@ -386,7 +386,7 @@ class Resource(object):
|
||||
while not check(handle_data):
|
||||
yield
|
||||
except Exception as ex:
|
||||
LOG.exception('%s : %s' % (action, str(self)))
|
||||
LOG.exception('%s : %s' % (action, str(self))) # noqa
|
||||
failure = exception.ResourceFailure(ex, self, action)
|
||||
self.state_set(action, self.FAILED, six.text_type(failure))
|
||||
raise failure
|
||||
@ -420,7 +420,7 @@ class Resource(object):
|
||||
% str(self.state))
|
||||
raise exception.ResourceFailure(exc, self, action)
|
||||
|
||||
LOG.info('creating %s' % str(self))
|
||||
LOG.info(_('creating %s') % str(self))
|
||||
|
||||
# Re-resolve the template, since if the resource Ref's
|
||||
# the StackId pseudo parameter, it will change after
|
||||
@ -501,7 +501,7 @@ class Resource(object):
|
||||
exc = Exception(_('Resource update already requested'))
|
||||
raise exception.ResourceFailure(exc, self, action)
|
||||
|
||||
LOG.info('updating %s' % str(self))
|
||||
LOG.info(_('updating %s') % str(self))
|
||||
|
||||
try:
|
||||
self.updated_time = datetime.utcnow()
|
||||
|
@ -168,7 +168,7 @@ class SoftwareConfig(resource.Resource):
|
||||
self.heat().software_configs.delete(self.resource_id)
|
||||
except heat_exp.HTTPNotFound:
|
||||
LOG.debug(
|
||||
_('Software config %s is not found.') % self.resource_id)
|
||||
'Software config %s is not found.' % self.resource_id)
|
||||
|
||||
def _resolve_attribute(self, name):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user