Update fetcher options

This updates the options registered in fetcher/__init__.py

Following modifications have been done:

* Add "fetcher" to common/config.py for config file generation

* Update "fetcher/backend" option help

* Rename "fetchers_opts" to "fetcher_opts": Only one fetcher per processor is
  used. This aims at clarifying the code

Change-Id: I408d4ea7b8009e90e93c8dc72635c8d362c4598a
This commit is contained in:
Luka Peschke 2018-10-01 17:25:14 +02:00
parent b6c87e3675
commit d4eea2537c
2 changed files with 6 additions and 4 deletions

View File

@ -43,6 +43,8 @@ _opts = [
cloudkitty.collector.gnocchi.collector_gnocchi_opts))),
('collector_monasca', list(itertools.chain(
cloudkitty.collector.monasca.collector_monasca_opts))),
('fetcher', list(itertools.chain(
cloudkitty.fetcher.fetcher_opts))),
('fetcher_gnocchi', list(itertools.chain(
cloudkitty.fetcher.gnocchi.gfetcher_opts,
cloudkitty.fetcher.gnocchi.fetcher_gnocchi_opts))),

View File

@ -22,13 +22,13 @@ from oslo_config import cfg
FETCHER_OPTS = 'fetcher'
DEPRECATED_FETCHER_OPTS = 'tenant_fetcher'
fetchers_opts = [
fetcher_opts = [
cfg.StrOpt('backend',
default='keystone',
help='Driver used to fetch tenant list.',
deprecated_group=DEPRECATED_FETCHER_OPTS)
help='Driver used to fetch the list of scopes to rate.',
deprecated_group=DEPRECATED_FETCHER_OPTS),
]
cfg.CONF.register_opts(fetchers_opts, 'fetcher')
cfg.CONF.register_opts(fetcher_opts, 'fetcher')
@six.add_metaclass(abc.ABCMeta)