Move to oslo.middlware request_id module
The oslo-incubator request_id module has been deprecated and removed for kilo, replaced by the request_id from oslo.middleware. Note that we need to leave the oslo-incubator request_id shim in place until after Kilo ships, so operators get fair warning about the backwards-incompatible paste.ini change. Change-Id: Iedbfede6d57312f565cf4b1ccb71a8418fad8620 Partial-Bug: #1380629
This commit is contained in:
parent
8354c981ba
commit
bea7df6b01
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user