summaryrefslogtreecommitdiff
path: root/oslo
diff options
context:
space:
mode:
Diffstat (limited to 'oslo')
-rw-r--r--oslo/middleware/catch_errors.py10
-rw-r--r--oslo/middleware/correlation_id.py3
-rw-r--r--oslo/middleware/request_id.py11
3 files changed, 11 insertions, 13 deletions
diff --git a/oslo/middleware/catch_errors.py b/oslo/middleware/catch_errors.py
index 73aeb9e..ed57f8a 100644
--- a/oslo/middleware/catch_errors.py
+++ b/oslo/middleware/catch_errors.py
@@ -13,11 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""Middleware that provides high-level error handling.
-
-It catches all exceptions from subsequent applications in WSGI pipeline
-to hide internal errors from API response.
-"""
import logging
import webob.dec
@@ -31,6 +26,11 @@ LOG = logging.getLogger(__name__)
class CatchErrors(base.Middleware):
+ """Middleware that provides high-level error handling.
+
+ It catches all exceptions from subsequent applications in WSGI pipeline
+ to hide internal errors from API response.
+ """
@webob.dec.wsgify
def __call__(self, req):
diff --git a/oslo/middleware/correlation_id.py b/oslo/middleware/correlation_id.py
index 3923654..2cde134 100644
--- a/oslo/middleware/correlation_id.py
+++ b/oslo/middleware/correlation_id.py
@@ -13,14 +13,13 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""Middleware that attaches a correlation id to WSGI request"""
-
import uuid
from oslo.middleware import base
class CorrelationId(base.Middleware):
+ "Middleware that attaches a correlation id to WSGI request"
def process_request(self, req):
correlation_id = (req.headers.get("X_CORRELATION_ID") or
diff --git a/oslo/middleware/request_id.py b/oslo/middleware/request_id.py
index 4d356b5..f3a22c1 100644
--- a/oslo/middleware/request_id.py
+++ b/oslo/middleware/request_id.py
@@ -13,12 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""Middleware that ensures request ID.
-
-It ensures to assign request ID for each API request and set it to
-request environment. The request ID is also added to API response.
-"""
-
import webob.dec
from oslo.middleware import base
@@ -30,6 +24,11 @@ HTTP_RESP_HEADER_REQUEST_ID = 'x-openstack-request-id'
class RequestId(base.Middleware):
+ """Middleware that ensures request ID.
+
+ It ensures to assign request ID for each API request and set it to
+ request environment. The request ID is also added to API response.
+ """
@webob.dec.wsgify
def __call__(self, req):