From 91943462d7e3e34b2472bc34b6531542ce3b6315 Mon Sep 17 00:00:00 2001 From: gordon chung Date: Thu, 21 Aug 2014 17:18:33 -0400 Subject: [PATCH] expose middleware through oslo.middleware allow middleware to be called through oslo.middleware rather than through module. Change-Id: Iee535002a3bed221f85e97fb10528fbb9234dcb1 --- oslo/middleware/__init__.py | 23 +++++++++++++++++++++++ tox.ini | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/oslo/middleware/__init__.py b/oslo/middleware/__init__.py index e69de29..5289943 100644 --- a/oslo/middleware/__init__.py +++ b/oslo/middleware/__init__.py @@ -0,0 +1,23 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +__all__ = ['CatchErrors', + 'CorrelationId', + 'Debug', + 'RequestId', + 'RequestBodySizeLimiter'] + +from oslo.middleware.catch_errors import CatchErrors +from oslo.middleware.correlation_id import CorrelationId +from oslo.middleware.debug import Debug +from oslo.middleware.request_id import RequestId +from oslo.middleware.sizelimit import RequestBodySizeLimiter diff --git a/tox.ini b/tox.ini index 14befe5..c8717b6 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' show-source = True ignore = E123,E125,H305,H803,H904 -exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,__init__.py [hacking] import_exceptions = oslo.middleware.i18n