summaryrefslogtreecommitdiff
path: root/oslo
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2014-08-26 10:18:51 -0400
committerDoug Hellmann <doug@doughellmann.com>2014-08-26 17:33:01 -0400
commitb6c4489960f8ae96ddb2cd63c0068f7295dd69d1 (patch)
tree75960e6aefd149e15cdfabcb4de5652354be72f5 /oslo
parentfc156ec0697df542a1d377346e37de91a6e14cac (diff)
downloadoslo-middleware-b6c4489960f8ae96ddb2cd63c0068f7295dd69d1.tar.gz
Update docs for first release
Ensure each exported class has a docstring. Add API to the sphinx docs. Fix a few formatting issues so the rendered docs look OK. Change-Id: Ieef7bae3783a084249169fe9b80ab17518eee15f
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):