Removed debug level messages translations
Cleared _() from all debug level messages in order to stick to new translations guidelines Change-Id: I724f790c733c67f1111a862c77cf44f7f17d194c Closes-Bug: #1276335
This commit is contained in:
parent
8ba3ff6d52
commit
62095da758
@ -76,8 +76,8 @@ def validate_queue_identification(validate, req, resp, params):
|
||||
project = params['project_id']
|
||||
queue = params['queue_name'].decode('utf-8', 'replace')
|
||||
|
||||
LOG.debug(_(u'Invalid queue name "%(queue)s" submitted for '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Invalid queue name "%(queue)s" submitted for '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue, 'project': project})
|
||||
|
||||
raise falcon.HTTPBadRequest(_(u'Invalid queue identification'),
|
||||
|
@ -22,7 +22,6 @@ from marconi.common import decorators
|
||||
from marconi.common import errors
|
||||
from marconi.common import utils
|
||||
from marconi.openstack.common.cache import cache as oslo_cache
|
||||
from marconi.openstack.common.gettextutils import _
|
||||
from marconi.openstack.common import log
|
||||
from marconi.queues.storage import pipeline
|
||||
from marconi.queues.storage import sharding
|
||||
@ -73,28 +72,28 @@ class Bootstrap(object):
|
||||
|
||||
@decorators.lazy_property(write=False)
|
||||
def storage(self):
|
||||
LOG.debug(_(u'Loading storage driver'))
|
||||
LOG.debug(u'Loading storage driver')
|
||||
|
||||
if self.conf.sharding:
|
||||
LOG.debug(_(u'Storage sharding enabled'))
|
||||
LOG.debug(u'Storage sharding enabled')
|
||||
storage_driver = sharding.DataDriver(self.conf, self.cache,
|
||||
self.control)
|
||||
else:
|
||||
storage_driver = storage_utils.load_storage_driver(
|
||||
self.conf, self.cache)
|
||||
|
||||
LOG.debug(_(u'Loading storage pipeline'))
|
||||
LOG.debug(u'Loading storage pipeline')
|
||||
return pipeline.DataDriver(self.conf, storage_driver)
|
||||
|
||||
@decorators.lazy_property(write=False)
|
||||
def control(self):
|
||||
LOG.debug(_(u'Loading storage control driver'))
|
||||
LOG.debug(u'Loading storage control driver')
|
||||
return storage_utils.load_storage_driver(self.conf, self.cache,
|
||||
control_mode=True)
|
||||
|
||||
@decorators.lazy_property(write=False)
|
||||
def cache(self):
|
||||
LOG.debug(_(u'Loading proxy cache driver'))
|
||||
LOG.debug(u'Loading proxy cache driver')
|
||||
try:
|
||||
oslo_cache.register_oslo_configs(self.conf)
|
||||
mgr = oslo_cache.get_cache(self.conf.cache_url)
|
||||
@ -106,7 +105,7 @@ class Bootstrap(object):
|
||||
@decorators.lazy_property(write=False)
|
||||
def transport(self):
|
||||
transport_name = self.driver_conf.transport
|
||||
LOG.debug(_(u'Loading transport driver: %s'), transport_name)
|
||||
LOG.debug(u'Loading transport driver: %s', transport_name)
|
||||
|
||||
args = [
|
||||
self.conf,
|
||||
|
@ -20,7 +20,6 @@ import six
|
||||
if not six.PY3:
|
||||
from keystoneclient.middleware import auth_token
|
||||
|
||||
from marconi.openstack.common.gettextutils import _
|
||||
from marconi.openstack.common import log
|
||||
|
||||
|
||||
@ -44,7 +43,7 @@ class KeystoneAuth(object):
|
||||
@classmethod
|
||||
def install(cls, app, conf):
|
||||
"""Install Auth check on application."""
|
||||
LOG.debug(_(u'Installing Keystone\'s auth protocol'))
|
||||
LOG.debug(u'Installing Keystone\'s auth protocol')
|
||||
cls._register_opts(conf)
|
||||
conf = dict(conf.get(cls.OPT_GROUP_NAME))
|
||||
return auth_token.AuthProtocol(app, conf=conf)
|
||||
|
@ -42,8 +42,8 @@ class Resource(object):
|
||||
class CollectionResource(Resource):
|
||||
|
||||
def on_post(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Claims collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Claims collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
# Check for an explicit limit on the # of messages to claim
|
||||
@ -102,8 +102,8 @@ class ItemResource(Resource):
|
||||
self._validate = validate
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name, claim_id):
|
||||
LOG.debug(_(u'Claim item GET - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s'),
|
||||
LOG.debug(u'Claim item GET - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s',
|
||||
{'queue_name': queue_name,
|
||||
'project_id': project_id,
|
||||
'claim_id': claim_id})
|
||||
@ -140,8 +140,8 @@ class ItemResource(Resource):
|
||||
# status defaults to 200
|
||||
|
||||
def on_patch(self, req, resp, project_id, queue_name, claim_id):
|
||||
LOG.debug(_(u'Claim Item PATCH - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project:%(project_id)s') %
|
||||
LOG.debug(u'Claim Item PATCH - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project:%(project_id)s' %
|
||||
{'queue_name': queue_name,
|
||||
'project_id': project_id,
|
||||
'claim_id': claim_id})
|
||||
@ -174,8 +174,8 @@ class ItemResource(Resource):
|
||||
raise wsgi_errors.HTTPServiceUnavailable(description)
|
||||
|
||||
def on_delete(self, req, resp, project_id, queue_name, claim_id):
|
||||
LOG.debug(_(u'Claim item DELETE - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s') %
|
||||
LOG.debug(u'Claim item DELETE - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s' %
|
||||
{'queue_name': queue_name,
|
||||
'project_id': project_id,
|
||||
'claim_id': claim_id})
|
||||
|
@ -132,8 +132,8 @@ class CollectionResource(object):
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
def on_post(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Messages collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Messages collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
client_uuid = wsgi_utils.get_client_uuid(req)
|
||||
@ -198,8 +198,8 @@ class CollectionResource(object):
|
||||
resp.status = falcon.HTTP_201
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Messages collection GET - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Messages collection GET - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
resp.content_location = req.relative_uri
|
||||
@ -249,8 +249,8 @@ class ItemResource(object):
|
||||
self.message_controller = message_controller
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name, message_id):
|
||||
LOG.debug(_(u'Messages item GET - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s'),
|
||||
LOG.debug(u'Messages item GET - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s',
|
||||
{'message': message_id,
|
||||
'queue': queue_name,
|
||||
'project': project_id})
|
||||
@ -278,8 +278,8 @@ class ItemResource(object):
|
||||
# status defaults to 200
|
||||
|
||||
def on_delete(self, req, resp, project_id, queue_name, message_id):
|
||||
LOG.debug(_(u'Messages item DELETE - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s'),
|
||||
LOG.debug(u'Messages item DELETE - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s',
|
||||
{'message': message_id,
|
||||
'queue': queue_name,
|
||||
'project': project_id})
|
||||
|
@ -37,8 +37,8 @@ class Resource(object):
|
||||
self.queue_ctrl = queue_controller
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue metadata GET - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue metadata GET - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
try:
|
||||
@ -59,8 +59,8 @@ class Resource(object):
|
||||
# status defaults to 200
|
||||
|
||||
def on_put(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue metadata PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue metadata PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
try:
|
||||
|
@ -35,8 +35,8 @@ class ItemResource(object):
|
||||
self.message_controller = message_controller
|
||||
|
||||
def on_put(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue item PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue item PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
try:
|
||||
@ -52,8 +52,8 @@ class ItemResource(object):
|
||||
resp.location = req.path
|
||||
|
||||
def on_head(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue item exists - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue item exists - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
if self.queue_controller.exists(queue_name, project=project_id):
|
||||
@ -66,8 +66,8 @@ class ItemResource(object):
|
||||
on_get = on_head
|
||||
|
||||
def on_delete(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue item DELETE - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue item DELETE - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
try:
|
||||
self.queue_controller.delete(queue_name, project=project_id)
|
||||
|
@ -42,8 +42,8 @@ class Resource(object):
|
||||
class CollectionResource(Resource):
|
||||
|
||||
def on_post(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Claims collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Claims collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
# Check for an explicit limit on the # of messages to claim
|
||||
@ -102,8 +102,8 @@ class ItemResource(Resource):
|
||||
self._validate = validate
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name, claim_id):
|
||||
LOG.debug(_(u'Claim item GET - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s'),
|
||||
LOG.debug(u'Claim item GET - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s',
|
||||
{'queue_name': queue_name,
|
||||
'project_id': project_id,
|
||||
'claim_id': claim_id})
|
||||
@ -140,8 +140,8 @@ class ItemResource(Resource):
|
||||
# status defaults to 200
|
||||
|
||||
def on_patch(self, req, resp, project_id, queue_name, claim_id):
|
||||
LOG.debug(_(u'Claim Item PATCH - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project:%(project_id)s') %
|
||||
LOG.debug(u'Claim Item PATCH - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project:%(project_id)s' %
|
||||
{'queue_name': queue_name,
|
||||
'project_id': project_id,
|
||||
'claim_id': claim_id})
|
||||
@ -174,8 +174,8 @@ class ItemResource(Resource):
|
||||
raise wsgi_errors.HTTPServiceUnavailable(description)
|
||||
|
||||
def on_delete(self, req, resp, project_id, queue_name, claim_id):
|
||||
LOG.debug(_(u'Claim item DELETE - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s') %
|
||||
LOG.debug(u'Claim item DELETE - claim: %(claim_id)s, '
|
||||
u'queue: %(queue_name)s, project: %(project_id)s' %
|
||||
{'queue_name': queue_name,
|
||||
'project_id': project_id,
|
||||
'claim_id': claim_id})
|
||||
|
@ -132,8 +132,8 @@ class CollectionResource(object):
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
def on_post(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Messages collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Messages collection POST - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
client_uuid = wsgi_utils.get_client_uuid(req)
|
||||
@ -198,8 +198,8 @@ class CollectionResource(object):
|
||||
resp.status = falcon.HTTP_201
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Messages collection GET - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Messages collection GET - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
resp.content_location = req.relative_uri
|
||||
@ -249,8 +249,8 @@ class ItemResource(object):
|
||||
self.message_controller = message_controller
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name, message_id):
|
||||
LOG.debug(_(u'Messages item GET - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s'),
|
||||
LOG.debug(u'Messages item GET - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s',
|
||||
{'message': message_id,
|
||||
'queue': queue_name,
|
||||
'project': project_id})
|
||||
@ -278,8 +278,8 @@ class ItemResource(object):
|
||||
# status defaults to 200
|
||||
|
||||
def on_delete(self, req, resp, project_id, queue_name, message_id):
|
||||
LOG.debug(_(u'Messages item DELETE - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s'),
|
||||
LOG.debug(u'Messages item DELETE - message: %(message)s, '
|
||||
u'queue: %(queue)s, project: %(project)s',
|
||||
{'message': message_id,
|
||||
'queue': queue_name,
|
||||
'project': project_id})
|
||||
|
@ -37,8 +37,8 @@ class Resource(object):
|
||||
self.queue_ctrl = queue_controller
|
||||
|
||||
def on_get(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue metadata GET - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue metadata GET - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
try:
|
||||
@ -59,8 +59,8 @@ class Resource(object):
|
||||
# status defaults to 200
|
||||
|
||||
def on_put(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue metadata PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue metadata PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
try:
|
||||
|
@ -35,8 +35,8 @@ class ItemResource(object):
|
||||
self.message_controller = message_controller
|
||||
|
||||
def on_put(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue item PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue item PUT - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
try:
|
||||
@ -52,8 +52,8 @@ class ItemResource(object):
|
||||
resp.location = req.path
|
||||
|
||||
def on_head(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue item exists - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue item exists - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
if self.queue_controller.exists(queue_name, project=project_id):
|
||||
@ -66,8 +66,8 @@ class ItemResource(object):
|
||||
on_get = on_head
|
||||
|
||||
def on_delete(self, req, resp, project_id, queue_name):
|
||||
LOG.debug(_(u'Queue item DELETE - queue: %(queue)s, '
|
||||
u'project: %(project)s'),
|
||||
LOG.debug(u'Queue item DELETE - queue: %(queue)s, '
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
try:
|
||||
self.queue_controller.delete(queue_name, project=project_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user