summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2016-11-28 14:43:26 +0100
committerJulien Danjou <julien@danjou.info>2016-11-29 14:43:22 +0100
commitb52832570f6938cc12e5827b0e43b291293f6bca (patch)
tree62310232f117d870fe792cf49b14c9d0f8e42ce7
parent18cc2206ac576ea35a8cefb416b941068bddfd16 (diff)
downloadoslo-middleware-b52832570f6938cc12e5827b0e43b291293f6bca.tar.gz
Suggest to use egg based filter_factory rather than fragile full path
This makes sure that if the module organization change, nothing breaks. Change-Id: Ib4fb1e2210a9cea6b12214e0d1e3570086ac2e68
-rw-r--r--doc/source/cors.rst4
-rw-r--r--doc/source/oslo_config.rst4
-rw-r--r--oslo_middleware/healthcheck/__init__.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/doc/source/cors.rst b/doc/source/cors.rst
index ea19d9e..77bb6ed 100644
--- a/doc/source/cors.rst
+++ b/doc/source/cors.rst
@@ -62,7 +62,7 @@ If your application is using pastedeploy, the following configuration block
will add CORS support.::
[filter:cors]
- paste.filter_factory = oslo_middleware.cors:filter_factory
+ use = egg:oslo.middleware#cors
allowed_origin=https://website.example.com:443,https://website2.example.com:443
max_age=3600
allow_methods=GET,POST,PUT,DELETE
@@ -74,7 +74,7 @@ existing configuration from oslo_config in order to simplify the points of
configuration, this may be done as follows.::
[filter:cors]
- paste.filter_factory = oslo_middleware.cors:filter_factory
+ use = egg:oslo.middleware#cors
oslo_config_project = oslo_project_name
# Optional field, in case the program name is different from the project:
diff --git a/doc/source/oslo_config.rst b/doc/source/oslo_config.rst
index 6e772c6..e6134a5 100644
--- a/doc/source/oslo_config.rst
+++ b/doc/source/oslo_config.rst
@@ -23,7 +23,7 @@ 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
+ use = egg:oslo.middleware#sizelimit
# 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:
@@ -45,7 +45,7 @@ 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
+ use = egg:oslo.middleware#sizelimit
max_request_body_size=1000
This will override any configuration done via oslo.config
diff --git a/oslo_middleware/healthcheck/__init__.py b/oslo_middleware/healthcheck/__init__.py
index 81aed9e..26b09fb 100644
--- a/oslo_middleware/healthcheck/__init__.py
+++ b/oslo_middleware/healthcheck/__init__.py
@@ -240,7 +240,7 @@ class Healthcheck(base.ConfigurableMiddleware):
.. code-block:: ini
[filter:healthcheck]
- paste.filter_factory = oslo_middleware:Healthcheck.factory
+ use = egg:oslo.middleware#healthcheck
path = /healthcheck
backends = disable_by_file
disable_by_file_path = /var/run/nova/healthcheck_disable
@@ -260,13 +260,13 @@ class Healthcheck(base.ConfigurableMiddleware):
pipeline = healthcheck_admin sizelimit [...] admin_service
[filter:healthcheck_public]
- paste.filter_factory = oslo_middleware:Healthcheck.factory
+ use = egg:oslo.middleware#healthcheck
path = /healthcheck_public
backends = disable_by_file
disable_by_file_path = /var/run/nova/healthcheck_public_disable
[filter:healthcheck_admin]
- paste.filter_factory = oslo_middleware:Healthcheck.factory
+ use = egg:oslo.middleware#healthcheck
path = /healthcheck_admin
backends = disable_by_file
disable_by_file_path = /var/run/nova/healthcheck_admin_disable