Remove deprecated config section names
Some config section names have been deprecated in cloudkitty 9.0.0. This removes support for the deprecated section names. Change-Id: If7d5c953732ef507717f4a66ad6c9b39ff5fe5f7
This commit is contained in:
parent
78bcc65227
commit
72a7b3f7d9
|
@ -37,21 +37,7 @@ from cloudkitty import utils as ck_utils
|
|||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# NOTE(mc): The deprecated section should be removed in a future release.
|
||||
COLLECTOR_GNOCCHI_OPTS = 'collector_gnocchi'
|
||||
DEPRECATED_COLLECTOR_GNOCCHI_OPTS = 'gnocchi_collector'
|
||||
|
||||
keystone_opts = ks_loading.get_auth_common_conf_options() + \
|
||||
ks_loading.get_session_conf_options()
|
||||
|
||||
keystone_opts = [
|
||||
cfg.Opt(
|
||||
o.name,
|
||||
type=o.type,
|
||||
help=o.help,
|
||||
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||
) for o in keystone_opts
|
||||
]
|
||||
|
||||
collector_gnocchi_opts = [
|
||||
cfg.StrOpt(
|
||||
|
@ -60,35 +46,31 @@ collector_gnocchi_opts = [
|
|||
choices=['keystone', 'basic'],
|
||||
help='Gnocchi auth type (keystone or basic). Keystone credentials '
|
||||
'can be specified through the "auth_section" parameter',
|
||||
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||
),
|
||||
cfg.StrOpt(
|
||||
'gnocchi_user',
|
||||
default='',
|
||||
help='Gnocchi user (for basic auth only)',
|
||||
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||
),
|
||||
cfg.StrOpt(
|
||||
'gnocchi_endpoint',
|
||||
default='',
|
||||
help='Gnocchi endpoint (for basic auth only)',
|
||||
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||
),
|
||||
cfg.StrOpt(
|
||||
'interface',
|
||||
default='internalURL',
|
||||
help='Endpoint URL type (for keystone auth only)',
|
||||
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||
),
|
||||
cfg.StrOpt(
|
||||
'region_name',
|
||||
default='RegionOne',
|
||||
help='Region Name',
|
||||
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||
),
|
||||
]
|
||||
|
||||
cfg.CONF.register_opts(keystone_opts, COLLECTOR_GNOCCHI_OPTS)
|
||||
ks_loading.register_session_conf_options(cfg.CONF, COLLECTOR_GNOCCHI_OPTS)
|
||||
ks_loading.register_auth_conf_options(cfg.CONF, COLLECTOR_GNOCCHI_OPTS)
|
||||
cfg.CONF.register_opts(collector_gnocchi_opts, COLLECTOR_GNOCCHI_OPTS)
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -42,7 +42,6 @@ _opts = [
|
|||
('collect', list(itertools.chain(
|
||||
cloudkitty.collector.collect_opts))),
|
||||
('collector_gnocchi', list(itertools.chain(
|
||||
cloudkitty.collector.gnocchi.keystone_opts,
|
||||
cloudkitty.collector.gnocchi.collector_gnocchi_opts))),
|
||||
('collector_monasca', list(itertools.chain(
|
||||
cloudkitty.collector.monasca.keystone_opts,
|
||||
|
@ -55,7 +54,6 @@ _opts = [
|
|||
cloudkitty.fetcher.gnocchi.gfetcher_opts,
|
||||
cloudkitty.fetcher.gnocchi.fetcher_gnocchi_opts))),
|
||||
('fetcher_keystone', list(itertools.chain(
|
||||
cloudkitty.fetcher.keystone.keystone_opts,
|
||||
cloudkitty.fetcher.keystone.fetcher_keystone_opts))),
|
||||
('fetcher_prometheus', list(itertools.chain(
|
||||
cloudkitty.fetcher.prometheus.fetcher_prometheus_opts))),
|
||||
|
|
|
@ -19,12 +19,10 @@ import six
|
|||
from oslo_config import cfg
|
||||
|
||||
FETCHER_OPTS = 'fetcher'
|
||||
DEPRECATED_FETCHER_OPTS = 'tenant_fetcher'
|
||||
fetcher_opts = [
|
||||
cfg.StrOpt('backend',
|
||||
default='keystone',
|
||||
help='Driver used to fetch the list of scopes to rate.',
|
||||
deprecated_group=DEPRECATED_FETCHER_OPTS),
|
||||
help='Driver used to fetch the list of scopes to rate.'),
|
||||
]
|
||||
cfg.CONF.register_opts(fetcher_opts, 'fetcher')
|
||||
|
||||
|
|
|
@ -23,40 +23,18 @@ from oslo_config import cfg
|
|||
from cloudkitty import fetcher
|
||||
|
||||
|
||||
# NOTE(mc): The deprecated section should be removed in a future release.
|
||||
FETCHER_KEYSTONE_OPTS = 'fetcher_keystone'
|
||||
DEPRECATED_FETCHER_KEYSTONE_OPTS = 'keystone_fetcher'
|
||||
|
||||
keystone_opts = ks_loading.get_auth_common_conf_options() + \
|
||||
ks_loading.get_session_conf_options()
|
||||
|
||||
keystone_opts = [
|
||||
cfg.Opt(
|
||||
opt.name,
|
||||
type=opt.type,
|
||||
help=opt.help,
|
||||
secret=opt.secret,
|
||||
required=opt.required,
|
||||
deprecated_group=DEPRECATED_FETCHER_KEYSTONE_OPTS,
|
||||
) for opt in keystone_opts
|
||||
]
|
||||
|
||||
fetcher_keystone_opts = [
|
||||
cfg.StrOpt(
|
||||
'keystone_version',
|
||||
default='2',
|
||||
help='Keystone version to use.',
|
||||
deprecated_group=DEPRECATED_FETCHER_KEYSTONE_OPTS,
|
||||
),
|
||||
]
|
||||
|
||||
cfg.CONF.register_opts(keystone_opts, FETCHER_KEYSTONE_OPTS)
|
||||
if cfg.CONF[FETCHER_KEYSTONE_OPTS].auth_section:
|
||||
cfg.CONF.register_opts(
|
||||
keystone_opts,
|
||||
cfg.CONF[FETCHER_KEYSTONE_OPTS].auth_section,
|
||||
)
|
||||
|
||||
ks_loading.register_session_conf_options(cfg.CONF, FETCHER_KEYSTONE_OPTS)
|
||||
ks_loading.register_auth_conf_options(cfg.CONF, FETCHER_KEYSTONE_OPTS)
|
||||
cfg.CONF.register_opts(fetcher_keystone_opts, FETCHER_KEYSTONE_OPTS)
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -17,17 +17,13 @@ from oslo_config import cfg
|
|||
|
||||
from cloudkitty import fetcher
|
||||
|
||||
|
||||
# NOTE(mc): The deprecated section should be removed in a future release.
|
||||
FETCHER_SOURCE_OPTS = 'fetcher_source'
|
||||
DEPRECATED_FETCHER_SOURCE_OPTS = 'source_fetcher'
|
||||
|
||||
fetcher_source_opts = [
|
||||
cfg.ListOpt(
|
||||
'sources',
|
||||
default=list(),
|
||||
help='list of source identifiers',
|
||||
deprecated_group=DEPRECATED_FETCHER_SOURCE_OPTS,
|
||||
),
|
||||
]
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@ from cloudkitty.storage.v1.hybrid import migration
|
|||
from cloudkitty.storage.v1.hybrid import models
|
||||
|
||||
|
||||
# NOTE(mc): The deprecated section should be removed in a future release.
|
||||
DEPRECATED_STORAGE_HYBRID_OPTS = 'hybrid_storage'
|
||||
STORAGE_HYBRID_OPTS = 'storage_hybrid'
|
||||
|
||||
storage_opts = [
|
||||
|
@ -33,7 +31,6 @@ storage_opts = [
|
|||
default='gnocchi',
|
||||
help='Name of the storage backend that should be used '
|
||||
'by the hybrid storage',
|
||||
deprecated_group=DEPRECATED_STORAGE_HYBRID_OPTS,
|
||||
)
|
||||
]
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Section names that had been deprecated in cloudkitty 9.0.0 have been removed
|
||||
in 11.0.0. These include ``gnocchi_collector``, ``tenant_fetcher``,
|
||||
``keystone_fetcher``, ``source_fetcher`` and ``hybrid_storage``.
|
Loading…
Reference in New Issue