Merge "Add oslo.config.opts entrypoint for audit middleware options"

This commit is contained in:
Zuul 2022-05-06 17:33:40 +00:00 committed by Gerrit Code Review
commit 255808424c
2 changed files with 3 additions and 2 deletions

View File

@ -92,7 +92,7 @@ class AuditMiddleware(object):
self._application = app
self._conf = config.Config('audit',
AUDIT_MIDDLEWARE_GROUP,
_list_opts(),
list_opts(),
conf)
global _LOG
_LOG = logging.getLogger(conf.get('log_name', __name__))
@ -165,7 +165,7 @@ class AuditMiddleware(object):
return response
def _list_opts():
def list_opts():
"""Return a list of oslo_config options available in audit middleware.
The returned list includes all oslo_config options which may be registered

View File

@ -33,6 +33,7 @@ setup-hooks =
[entry_points]
oslo.config.opts =
keystonemiddleware.auth_token = keystonemiddleware.auth_token._opts:list_opts
keystonemiddleware.audit = keystonemiddleware.audit:list_opts
paste.filter_factory =
auth_token = keystonemiddleware.auth_token:filter_factory