summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/healthcheck_plugins.rst3
-rw-r--r--doc/source/index.rst1
-rw-r--r--doc/source/oslo_config.rst53
3 files changed, 57 insertions, 0 deletions
diff --git a/doc/source/healthcheck_plugins.rst b/doc/source/healthcheck_plugins.rst
index c3e43ec..04683cc 100644
--- a/doc/source/healthcheck_plugins.rst
+++ b/doc/source/healthcheck_plugins.rst
@@ -2,5 +2,8 @@
Healthcheck middleware plugins
================================
+.. automodule:: oslo_middleware.healthcheck
+ :members:
+
.. automodule:: oslo_middleware.healthcheck.disable_by_file
:members:
diff --git a/doc/source/index.rst b/doc/source/index.rst
index ebca9f6..055768d 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -10,4 +10,5 @@ Contents
api
healthcheck_plugins
cors
+ oslo_config
contributing
diff --git a/doc/source/oslo_config.rst b/doc/source/oslo_config.rst
new file mode 100644
index 0000000..09c83c6
--- /dev/null
+++ b/doc/source/oslo_config.rst
@@ -0,0 +1,53 @@
+=============================
+Middlewares and configuration
+=============================
+
+Middlewares can be configured in multiple fashion depending of the
+application needs. Here is some use-cases:
+
+Configuration from the application
+----------------------------------
+
+The application code will looks like::
+
+ from oslo_middleware import sizelimit
+ from oslo_config import cfg
+
+ conf = cfg.ConfigOpts()
+ app = sizelimit.RequestBodySizeLimiter(your_wsgi_application, conf)
+
+
+Configuration with paste-deploy and the oslo.config
+---------------------------------------------------
+
+The paste filter (in /etc/my_app/api-paste.ini) will looks like::
+
+ [filter:sizelimit]
+ paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory
+ # In case of the application doesn't use the global oslo.config
+ # object. The middleware must known the app name to load
+ # the application configuration, by setting this:
+ # oslo_config_project = my_app
+
+The oslo.config file of the application (eg: /etc/my_app/my_app.conf) will looks like::
+
+ [oslo_middleware]
+ max_request_body_size=1000
+
+
+Configuration with pastedeploy only
+-----------------------------------
+
+The paste filter (in /etc/my_app/api-paste.ini) will looks like::
+
+ [filter:sizelimit]
+ paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory
+ max_request_body_size=1000
+
+This will override any configuration done via oslo.config
+
+
+.. note::
+
+ healtcheck middleware does not yet use oslo.config, see :doc:`healthcheck_plugins`
+