summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2021-08-12 11:14:11 +0900
committerTakashi Kajinami <tkajinam@redhat.com>2021-08-12 11:17:13 +0900
commit7b8a72d2c5f4643c1b005e84ee016d7629f111d0 (patch)
tree260fb61381af787e9f21389e5c38a3874c413a52
parent90df936708aee36d77cead548d04cb7db2327f47 (diff)
downloadkeystonemiddleware-7b8a72d2c5f4643c1b005e84ee016d7629f111d0.tar.gz
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
-rw-r--r--keystonemiddleware/audit/__init__.py4
-rw-r--r--setup.cfg1
2 files changed, 3 insertions, 2 deletions
diff --git a/keystonemiddleware/audit/__init__.py b/keystonemiddleware/audit/__init__.py
index 9b4c380..bf7bae9 100644
--- a/keystonemiddleware/audit/__init__.py
+++ b/keystonemiddleware/audit/__init__.py
@@ -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
diff --git a/setup.cfg b/setup.cfg
index 34e3749..1a3bf84 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -32,6 +32,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