From 8124ef0e71f16794f40b83e9d7528770882e34cc Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Tue, 21 Feb 2017 15:03:15 -0500 Subject: [PATCH] Move auth and osprofiler to middleware folder Now we have keystone and osprofiler middleware, and we will add cors middleware next. So it's better to move them to a common folder. Then they can be mantained and read easily. Change-Id: Ic7e365860a29adaf9cbde665c16986262cff5f2b Implements: blueprint support-cors --- doc/source/api/zaqar.transport.auth.rst | 7 ------- doc/source/api/zaqar.transport.middleware.auth.rst | 7 +++++++ zaqar/bootstrap.py | 2 +- zaqar/transport/middleware/__init__.py | 0 zaqar/transport/{ => middleware}/auth.py | 0 zaqar/{ => transport/middleware}/profile.py | 0 zaqar/transport/websocket/driver.py | 2 +- zaqar/transport/wsgi/driver.py | 10 +++++----- 8 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 doc/source/api/zaqar.transport.auth.rst create mode 100644 doc/source/api/zaqar.transport.middleware.auth.rst create mode 100644 zaqar/transport/middleware/__init__.py rename zaqar/transport/{ => middleware}/auth.py (100%) rename zaqar/{ => transport/middleware}/profile.py (100%) diff --git a/doc/source/api/zaqar.transport.auth.rst b/doc/source/api/zaqar.transport.auth.rst deleted file mode 100644 index bfd9e3e85..000000000 --- a/doc/source/api/zaqar.transport.auth.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`zaqar.transport.auth` module -======================================= - -.. automodule:: zaqar.transport.auth - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/zaqar.transport.middleware.auth.rst b/doc/source/api/zaqar.transport.middleware.auth.rst new file mode 100644 index 000000000..d6ee2c7cb --- /dev/null +++ b/doc/source/api/zaqar.transport.middleware.auth.rst @@ -0,0 +1,7 @@ +The :mod:`zaqar.transport.middleware.auth` module +================================================= + +.. automodule:: zaqar.transport.middleware.auth + :members: + :undoc-members: + :show-inheritance: diff --git a/zaqar/bootstrap.py b/zaqar/bootstrap.py index cdc1ed1c4..d98cc3ce3 100644 --- a/zaqar/bootstrap.py +++ b/zaqar/bootstrap.py @@ -26,11 +26,11 @@ from zaqar.common import configs from zaqar.common import consts from zaqar.common import decorators from zaqar.common import errors -from zaqar import profile from zaqar.storage import pipeline from zaqar.storage import pooling from zaqar.storage import utils as storage_utils from zaqar.transport import base +from zaqar.transport.middleware import profile from zaqar.transport import validation from zaqar.i18n import _LE diff --git a/zaqar/transport/middleware/__init__.py b/zaqar/transport/middleware/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/zaqar/transport/auth.py b/zaqar/transport/middleware/auth.py similarity index 100% rename from zaqar/transport/auth.py rename to zaqar/transport/middleware/auth.py diff --git a/zaqar/profile.py b/zaqar/transport/middleware/profile.py similarity index 100% rename from zaqar/profile.py rename to zaqar/transport/middleware/profile.py diff --git a/zaqar/transport/websocket/driver.py b/zaqar/transport/websocket/driver.py index 677748027..c7c7f37d9 100644 --- a/zaqar/transport/websocket/driver.py +++ b/zaqar/transport/websocket/driver.py @@ -25,8 +25,8 @@ except ImportError: from zaqar.common import decorators from zaqar.i18n import _ -from zaqar.transport import auth from zaqar.transport import base +from zaqar.transport.middleware import auth from zaqar.transport.websocket import factory diff --git a/zaqar/transport/wsgi/driver.py b/zaqar/transport/wsgi/driver.py index 7ff82167f..743606b30 100644 --- a/zaqar/transport/wsgi/driver.py +++ b/zaqar/transport/wsgi/driver.py @@ -14,22 +14,22 @@ # limitations under the License. from distutils import version as d_version +import falcon +import six +import socket from wsgiref import simple_server -import falcon from oslo_config import cfg from oslo_log import log as logging from oslo_utils import netutils -import six -import socket from zaqar.common import decorators from zaqar.common.transport.wsgi import helpers from zaqar.i18n import _ -from zaqar import profile from zaqar import transport from zaqar.transport import acl -from zaqar.transport import auth +from zaqar.transport.middleware import auth +from zaqar.transport.middleware import profile from zaqar.transport import validation from zaqar.transport.wsgi import v1_0 from zaqar.transport.wsgi import v1_1