Add oslo.config.opts entrypoint for audit middleware options
... so that each service using the audit middleware can include these parameters in .conf file generated by oslo-config-generator by adding that entrypoint to the command. Closes-Bug: #1939632 Change-Id: Ied954c633570c51af9504514ffed18e12de8caac
This commit is contained in:
parent
90df936708
commit
7b8a72d2c5
@ -92,7 +92,7 @@ class AuditMiddleware(object):
|
|||||||
self._application = app
|
self._application = app
|
||||||
self._conf = config.Config('audit',
|
self._conf = config.Config('audit',
|
||||||
AUDIT_MIDDLEWARE_GROUP,
|
AUDIT_MIDDLEWARE_GROUP,
|
||||||
_list_opts(),
|
list_opts(),
|
||||||
conf)
|
conf)
|
||||||
global _LOG
|
global _LOG
|
||||||
_LOG = logging.getLogger(conf.get('log_name', __name__))
|
_LOG = logging.getLogger(conf.get('log_name', __name__))
|
||||||
@ -165,7 +165,7 @@ class AuditMiddleware(object):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def _list_opts():
|
def list_opts():
|
||||||
"""Return a list of oslo_config options available in audit middleware.
|
"""Return a list of oslo_config options available in audit middleware.
|
||||||
|
|
||||||
The returned list includes all oslo_config options which may be registered
|
The returned list includes all oslo_config options which may be registered
|
||||||
|
@ -32,6 +32,7 @@ setup-hooks =
|
|||||||
[entry_points]
|
[entry_points]
|
||||||
oslo.config.opts =
|
oslo.config.opts =
|
||||||
keystonemiddleware.auth_token = keystonemiddleware.auth_token._opts:list_opts
|
keystonemiddleware.auth_token = keystonemiddleware.auth_token._opts:list_opts
|
||||||
|
keystonemiddleware.audit = keystonemiddleware.audit:list_opts
|
||||||
|
|
||||||
paste.filter_factory =
|
paste.filter_factory =
|
||||||
auth_token = keystonemiddleware.auth_token:filter_factory
|
auth_token = keystonemiddleware.auth_token:filter_factory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user