Register keystone auth options with keystoneauth1 helper functions
This replaces manual config option registration with "keystoneauth1.loading.register_auth_conf_options" in the monasca collector. Registering the config options manually causes the "auth_section" option to be unavailable when using the source fetcher. Change-Id: Iddc590ff2e321392bb0d78f603a96f5b37bda31c Story: 2006606 Task: 36774
This commit is contained in:
parent
4d46b62a5a
commit
3cab85a1c2
|
@ -34,9 +34,6 @@ LOG = logging.getLogger(__name__)
|
|||
MONASCA_API_VERSION = '2_0'
|
||||
COLLECTOR_MONASCA_OPTS = 'collector_monasca'
|
||||
|
||||
keystone_opts = ks_loading.get_auth_common_conf_options() + \
|
||||
ks_loading.get_session_conf_options()
|
||||
|
||||
collector_monasca_opts = [
|
||||
cfg.StrOpt(
|
||||
'interface',
|
||||
|
@ -51,8 +48,10 @@ collector_monasca_opts = [
|
|||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(keystone_opts, COLLECTOR_MONASCA_OPTS)
|
||||
|
||||
CONF.register_opts(collector_monasca_opts, COLLECTOR_MONASCA_OPTS)
|
||||
ks_loading.register_auth_conf_options(CONF, COLLECTOR_MONASCA_OPTS)
|
||||
ks_loading.register_session_conf_options(CONF, COLLECTOR_MONASCA_OPTS)
|
||||
|
||||
METRICS_CONF = ck_utils.load_conf(CONF.collect.metrics_conf)
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ _opts = [
|
|||
cloudkitty.collector.gnocchi.keystone_opts,
|
||||
cloudkitty.collector.gnocchi.collector_gnocchi_opts))),
|
||||
('collector_monasca', list(itertools.chain(
|
||||
cloudkitty.collector.monasca.keystone_opts,
|
||||
cloudkitty.collector.monasca.collector_monasca_opts))),
|
||||
('collector_prometheus', list(itertools.chain(
|
||||
cloudkitty.collector.prometheus.collector_prometheus_opts))),
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Keystone authentication options are now registered with ``keystoneauth1`` in
|
||||
the monasca collector helper functions, which allows to use the
|
||||
``auth_section`` option even when using the ``source`` fetcher.
|
Loading…
Reference in New Issue