summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-06-16 21:04:59 +0000
committerGerrit Code Review <review@openstack.org>2016-06-16 21:04:59 +0000
commitc657ccb3e4e0c62f5879b9a7503e281bc6ca44a9 (patch)
treebbc86fea74dead8567aaba6cc34c6e765728df00
parentaba811b5ef1e6fcfc6123232a70e8af9b08ba611 (diff)
parent652dcc0072a9449a1ea4d60d2f2537651a82fd41 (diff)
downloadoslo-middleware-c657ccb3e4e0c62f5879b9a7503e281bc6ca44a9.tar.gz
Merge "Expose sample config opts for http-proxy-to-wsgi"3.14.0
-rw-r--r--oslo_middleware/opts.py29
-rw-r--r--setup.cfg1
2 files changed, 29 insertions, 1 deletions
diff --git a/oslo_middleware/opts.py b/oslo_middleware/opts.py
index 1fe8c89..e66e723 100644
--- a/oslo_middleware/opts.py
+++ b/oslo_middleware/opts.py
@@ -17,7 +17,8 @@ __all__ = [
'list_opts',
'list_opts_sizelimit',
'list_opts_ssl',
- 'list_opts_cors'
+ 'list_opts_cors',
+ 'list_opts_http_proxy_to_wsgi',
]
@@ -25,6 +26,7 @@ import copy
import itertools
from oslo_middleware import cors
+from oslo_middleware import http_proxy_to_wsgi
from oslo_middleware import sizelimit
from oslo_middleware import ssl
@@ -53,6 +55,7 @@ def list_opts():
list_opts_sizelimit(),
list_opts_ssl(),
list_opts_cors(),
+ list_opts_http_proxy_to_wsgi(),
)
)
@@ -128,3 +131,27 @@ def list_opts_cors():
('cors', copy.deepcopy(cors.CORS_OPTS)),
('cors.subdomain', copy.deepcopy(cors.CORS_OPTS))
]
+
+
+def list_opts_http_proxy_to_wsgi():
+ """Return a list of oslo.config options for http_proxy_to_wsgi.
+
+ The returned list includes all oslo.config options which may be registered
+ at runtime by the library.
+
+ Each element of the list is a tuple. The first element is the name of the
+ group under which the list of elements in the second element will be
+ registered. A group name of None corresponds to the [DEFAULT] group in
+ config files.
+
+ This function is also discoverable via the 'oslo.middleware' entry point
+ under the 'oslo.config.opts' namespace.
+
+ The purpose of this is to allow tools like the Oslo sample config file
+ generator to discover the options exposed to users by this library.
+
+ :returns: a list of (group_name, opts) tuples
+ """
+ return [
+ ('oslo_middleware', copy.deepcopy(http_proxy_to_wsgi.OPTS)),
+ ]
diff --git a/setup.cfg b/setup.cfg
index 87be3b2..d2a7686 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -28,6 +28,7 @@ oslo.config.opts =
oslo.middleware.cors = oslo_middleware.opts:list_opts_cors
oslo.middleware.sizelimit = oslo_middleware.opts:list_opts_sizelimit
oslo.middleware.ssl = oslo_middleware.opts:list_opts_ssl
+ oslo.middleware.http_proxy_to_wsgi = oslo_middleware.opts:list_opts_http_proxy_to_wsgi
oslo.middleware.healthcheck =
disable_by_file = oslo_middleware.healthcheck.disable_by_file:DisableByFileHealthcheck