Merge "Move to oslo.middlware request_id module"

This commit is contained in:
Jenkins 2014-10-27 02:17:08 +00:00 committed by Gerrit Code Review
commit 3dc63d07be
3 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ paste.filter_factory = heat.common.custom_backend_auth:filter_factory
# Middleware to set x-openstack-request-id in http response header
[filter:request_id]
paste.filter_factory = heat.openstack.common.middleware.request_id:RequestIdMiddleware.factory
paste.filter_factory = oslo.middleware.request_id:RequestId.factory
[filter:osprofiler]
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.middleware import request_id as oslo_request_id
from oslo.utils import importutils
from heat.common import exception
@ -20,7 +21,6 @@ from heat.db import api as db_api
from heat.engine import clients
from heat.openstack.common import context
from heat.openstack.common import local
from heat.openstack.common.middleware import request_id
class RequestContext(context.RequestContext):
@ -156,7 +156,7 @@ class ContextMiddleware(wsgi.Middleware):
if roles is not None:
roles = roles.split(',')
token_info = environ.get('keystone.token_info')
req_id = environ.get(request_id.ENV_REQUEST_ID)
req_id = environ.get(oslo_request_id.ENV_REQUEST_ID)
except Exception:
raise exception.NotAuthenticated()

View File

@ -14,11 +14,11 @@
import mock
import os
from oslo.config import cfg
from oslo.middleware import request_id
import webob
from heat.common import context
from heat.common import exception
from heat.openstack.common.middleware import request_id
from heat.openstack.common import policy as base_policy
from heat.tests import common