Change configuration section names
In order to respect the convention [backendtype_backendname] for all collectors and storage backends in Cloudkitty configuration some sections names has changed. * For the Gnocchi collector, [collector_gnocchi] has been added in addition to [gnocchi_collector]. This last one will be removed in the future. * For the hybrid storage, [storage_hybrid] has been added in addition to [hybrid_storage]. This last one will be removed in the future. * For the keystone fetcher, [fetcher_keystone] has been added in addition to [keystone_fetcher]. This last one will be removed in the future. * For the hybrid storage, [fetcher_source] has been added in addition to [source_fetcher]. This last one will be removed in the future. * Fix Prometheus section name. Change-Id: I3435a151de4b384f2f2540225504abe6c99b928e Story: 2001053 Task: 4654
This commit is contained in:
@@ -30,46 +30,59 @@ from cloudkitty import utils as ck_utils
|
|||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
GNOCCHI_COLLECTOR_OPTS = 'gnocchi_collector'
|
# NOTE(mc): The deprecated section should be removed in a future release.
|
||||||
gnocchi_collector_opts = ks_loading.get_auth_common_conf_options()
|
COLLECTOR_GNOCCHI_OPTS = 'collector_gnocchi'
|
||||||
gcollector_opts = [
|
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,
|
||||||
|
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||||
|
) for o in keystone_opts
|
||||||
|
]
|
||||||
|
|
||||||
|
collector_gnocchi_opts = [
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'gnocchi_auth_type',
|
'gnocchi_auth_type',
|
||||||
default='keystone',
|
default='keystone',
|
||||||
choices=['keystone', 'basic'],
|
choices=['keystone', 'basic'],
|
||||||
help='Gnocchi auth type (keystone or basic). Keystone credentials '
|
help='Gnocchi auth type (keystone or basic). Keystone credentials '
|
||||||
'can be specified through the "auth_section" parameter',
|
'can be specified through the "auth_section" parameter',
|
||||||
|
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||||
),
|
),
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'gnocchi_user',
|
'gnocchi_user',
|
||||||
default='',
|
default='',
|
||||||
help='Gnocchi user (for basic auth only)',
|
help='Gnocchi user (for basic auth only)',
|
||||||
|
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||||
),
|
),
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'gnocchi_endpoint',
|
'gnocchi_endpoint',
|
||||||
default='',
|
default='',
|
||||||
help='Gnocchi endpoint (for basic auth only)',
|
help='Gnocchi endpoint (for basic auth only)',
|
||||||
|
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||||
),
|
),
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'interface',
|
'interface',
|
||||||
default='internalURL',
|
default='internalURL',
|
||||||
help='Endpoint URL type (for keystone auth only)',
|
help='Endpoint URL type (for keystone auth only)',
|
||||||
|
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||||
),
|
),
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'region_name',
|
'region_name',
|
||||||
default='RegionOne',
|
default='RegionOne',
|
||||||
help='Region Name',
|
help='Region Name',
|
||||||
|
deprecated_group=DEPRECATED_COLLECTOR_GNOCCHI_OPTS,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
cfg.CONF.register_opts(gnocchi_collector_opts, GNOCCHI_COLLECTOR_OPTS)
|
cfg.CONF.register_opts(keystone_opts, COLLECTOR_GNOCCHI_OPTS)
|
||||||
cfg.CONF.register_opts(gcollector_opts, GNOCCHI_COLLECTOR_OPTS)
|
cfg.CONF.register_opts(collector_gnocchi_opts, COLLECTOR_GNOCCHI_OPTS)
|
||||||
ks_loading.register_session_conf_options(
|
|
||||||
cfg.CONF,
|
|
||||||
GNOCCHI_COLLECTOR_OPTS)
|
|
||||||
ks_loading.register_auth_conf_options(
|
|
||||||
cfg.CONF,
|
|
||||||
GNOCCHI_COLLECTOR_OPTS)
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
GNOCCHI_EXTRA_SCHEMA = {
|
GNOCCHI_EXTRA_SCHEMA = {
|
||||||
@@ -92,23 +105,23 @@ class GnocchiCollector(collector.BaseCollector):
|
|||||||
super(GnocchiCollector, self).__init__(transformers, **kwargs)
|
super(GnocchiCollector, self).__init__(transformers, **kwargs)
|
||||||
|
|
||||||
adapter_options = {'connect_retries': 3}
|
adapter_options = {'connect_retries': 3}
|
||||||
if CONF.gnocchi_collector.gnocchi_auth_type == 'keystone':
|
if CONF.collector_gnocchi.gnocchi_auth_type == 'keystone':
|
||||||
auth_plugin = ks_loading.load_auth_from_conf_options(
|
auth_plugin = ks_loading.load_auth_from_conf_options(
|
||||||
CONF,
|
CONF,
|
||||||
'gnocchi_collector',
|
COLLECTOR_GNOCCHI_OPTS,
|
||||||
)
|
)
|
||||||
adapter_options['interface'] = CONF.gnocchi_collector.interface
|
adapter_options['interface'] = CONF.collector_gnocchi.interface
|
||||||
else:
|
else:
|
||||||
auth_plugin = gauth.GnocchiBasicPlugin(
|
auth_plugin = gauth.GnocchiBasicPlugin(
|
||||||
user=CONF.gnocchi_collector.gnocchi_user,
|
user=CONF.collector_gnocchi.gnocchi_user,
|
||||||
endpoint=CONF.gnocchi_collector.gnocchi_endpoint,
|
endpoint=CONF.collector_gnocchi.gnocchi_endpoint,
|
||||||
)
|
)
|
||||||
adapter_options['region_name'] = CONF.gnocchi_collector.region_name
|
adapter_options['region_name'] = CONF.collector_gnocchi.region_name
|
||||||
|
|
||||||
verify = True
|
verify = True
|
||||||
if CONF.gnocchi_collector.cafile:
|
if CONF.collector_gnocchi.cafile:
|
||||||
verify = CONF.gnocchi_collector.cafile
|
verify = CONF.collector_gnocchi.cafile
|
||||||
elif CONF.gnocchi_collector.insecure:
|
elif CONF.collector_gnocchi.insecure:
|
||||||
verify = False
|
verify = False
|
||||||
|
|
||||||
self._conn = gclient.Client(
|
self._conn = gclient.Client(
|
||||||
|
@@ -35,8 +35,8 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
MONASCA_API_VERSION = '2_0'
|
MONASCA_API_VERSION = '2_0'
|
||||||
COLLECTOR_MONASCA_OPTS = 'collector_monasca'
|
COLLECTOR_MONASCA_OPTS = 'collector_monasca'
|
||||||
collector_monasca_opts = ks_loading.get_auth_common_conf_options()
|
|
||||||
mcollector_opts = [
|
collector_monasca_opts = [
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'interface',
|
'interface',
|
||||||
default='internal',
|
default='internal',
|
||||||
@@ -50,7 +50,6 @@ mcollector_opts = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
cfg.CONF.register_opts(collector_monasca_opts, COLLECTOR_MONASCA_OPTS)
|
cfg.CONF.register_opts(collector_monasca_opts, COLLECTOR_MONASCA_OPTS)
|
||||||
cfg.CONF.register_opts(mcollector_opts, COLLECTOR_MONASCA_OPTS)
|
|
||||||
ks_loading.register_session_conf_options(
|
ks_loading.register_session_conf_options(
|
||||||
cfg.CONF,
|
cfg.CONF,
|
||||||
COLLECTOR_MONASCA_OPTS)
|
COLLECTOR_MONASCA_OPTS)
|
||||||
|
@@ -33,7 +33,7 @@ from cloudkitty import utils as ck_utils
|
|||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
PROMETHEUS_COLLECTOR_OPTS = 'prometheus_collector'
|
PROMETHEUS_COLLECTOR_OPTS = 'collector_prometheus'
|
||||||
pcollector_collector_opts = [
|
pcollector_collector_opts = [
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'prometheus_url',
|
'prometheus_url',
|
||||||
@@ -137,7 +137,7 @@ class PrometheusCollector(collector.BaseCollector):
|
|||||||
"""Returns metrics to be valorized."""
|
"""Returns metrics to be valorized."""
|
||||||
# NOTE(mc): Remove potential trailing '/' to avoid
|
# NOTE(mc): Remove potential trailing '/' to avoid
|
||||||
# url building problems
|
# url building problems
|
||||||
url = CONF.prometheus_collector.prometheus_url
|
url = CONF.collector_prometheus.prometheus_url
|
||||||
if url.endswith('/'):
|
if url.endswith('/'):
|
||||||
url = url[:-1]
|
url = url[:-1]
|
||||||
|
|
||||||
|
@@ -38,20 +38,19 @@ _opts = [
|
|||||||
cloudkitty.api.app.api_opts,))),
|
cloudkitty.api.app.api_opts,))),
|
||||||
('collect', list(itertools.chain(
|
('collect', list(itertools.chain(
|
||||||
cloudkitty.collector.collect_opts))),
|
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(
|
('collector_monasca', list(itertools.chain(
|
||||||
cloudkitty.collector.monasca.collector_monasca_opts,
|
cloudkitty.collector.monasca.collector_monasca_opts))),
|
||||||
cloudkitty.collector.monasca.mcollector_opts))),
|
|
||||||
('gnocchi_collector', list(itertools.chain(
|
|
||||||
cloudkitty.collector.gnocchi.gcollector_opts,
|
|
||||||
cloudkitty.collector.gnocchi.gnocchi_collector_opts))),
|
|
||||||
('fetcher_gnocchi', list(itertools.chain(
|
('fetcher_gnocchi', list(itertools.chain(
|
||||||
cloudkitty.fetcher.gnocchi.gfetcher_opts,
|
cloudkitty.fetcher.gnocchi.gfetcher_opts,
|
||||||
cloudkitty.fetcher.gnocchi.fetcher_gnocchi_opts))),
|
cloudkitty.fetcher.gnocchi.fetcher_gnocchi_opts))),
|
||||||
('keystone_fetcher', list(itertools.chain(
|
('fetcher_keystone', list(itertools.chain(
|
||||||
cloudkitty.fetcher.keystone.keystone_fetcher_opts,
|
cloudkitty.fetcher.keystone.keystone_opts,
|
||||||
cloudkitty.fetcher.keystone.keystone_common_opts))),
|
cloudkitty.fetcher.keystone.fetcher_keystone_opts))),
|
||||||
('source_fetcher', list(itertools.chain(
|
('fetcher_source', list(itertools.chain(
|
||||||
cloudkitty.fetcher.source.source_fetcher_opts))),
|
cloudkitty.fetcher.source.fetcher_source_opts))),
|
||||||
('orchestrator', list(itertools.chain(
|
('orchestrator', list(itertools.chain(
|
||||||
cloudkitty.orchestrator.orchestrator_opts))),
|
cloudkitty.orchestrator.orchestrator_opts))),
|
||||||
('output', list(itertools.chain(
|
('output', list(itertools.chain(
|
||||||
|
@@ -25,21 +25,42 @@ from oslo_config import cfg
|
|||||||
from cloudkitty import fetcher
|
from cloudkitty import fetcher
|
||||||
|
|
||||||
|
|
||||||
KEYSTONE_FETCHER_OPTS = 'keystone_fetcher'
|
# NOTE(mc): The deprecated section should be removed in a future release.
|
||||||
keystone_common_opts = ks_loading.get_auth_common_conf_options()
|
FETCHER_KEYSTONE_OPTS = 'fetcher_keystone'
|
||||||
keystone_fetcher_opts = [
|
DEPRECATED_FETCHER_KEYSTONE_OPTS = 'keystone_fetcher'
|
||||||
cfg.StrOpt('keystone_version',
|
|
||||||
default='2',
|
keystone_opts = ks_loading.get_auth_common_conf_options() + \
|
||||||
help='Keystone version to use.'), ]
|
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,
|
||||||
|
)
|
||||||
|
|
||||||
|
cfg.CONF.register_opts(fetcher_keystone_opts, FETCHER_KEYSTONE_OPTS)
|
||||||
|
|
||||||
cfg.CONF.register_opts(keystone_common_opts, KEYSTONE_FETCHER_OPTS)
|
|
||||||
cfg.CONF.register_opts(keystone_fetcher_opts, KEYSTONE_FETCHER_OPTS)
|
|
||||||
ks_loading.register_session_conf_options(
|
|
||||||
cfg.CONF,
|
|
||||||
KEYSTONE_FETCHER_OPTS)
|
|
||||||
ks_loading.register_auth_conf_options(
|
|
||||||
cfg.CONF,
|
|
||||||
KEYSTONE_FETCHER_OPTS)
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
@@ -51,19 +72,19 @@ class KeystoneFetcher(fetcher.BaseFetcher):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.auth = ks_loading.load_auth_from_conf_options(
|
self.auth = ks_loading.load_auth_from_conf_options(
|
||||||
CONF,
|
CONF,
|
||||||
KEYSTONE_FETCHER_OPTS)
|
FETCHER_KEYSTONE_OPTS)
|
||||||
self.session = ks_loading.load_session_from_conf_options(
|
self.session = ks_loading.load_session_from_conf_options(
|
||||||
CONF,
|
CONF,
|
||||||
KEYSTONE_FETCHER_OPTS,
|
FETCHER_KEYSTONE_OPTS,
|
||||||
auth=self.auth)
|
auth=self.auth)
|
||||||
self.admin_ks = kclient.Client(
|
self.admin_ks = kclient.Client(
|
||||||
version=CONF.keystone_fetcher.keystone_version,
|
version=CONF.fetcher_keystone.keystone_version,
|
||||||
session=self.session,
|
session=self.session,
|
||||||
auth_url=self.auth.auth_url)
|
auth_url=self.auth.auth_url)
|
||||||
|
|
||||||
def get_tenants(self):
|
def get_tenants(self):
|
||||||
keystone_version = discover.normalize_version_number(
|
keystone_version = discover.normalize_version_number(
|
||||||
CONF.keystone_fetcher.keystone_version)
|
CONF.fetcher_keystone.keystone_version)
|
||||||
auth_dispatch = {(3,): ('project', 'projects', 'list'),
|
auth_dispatch = {(3,): ('project', 'projects', 'list'),
|
||||||
(2,): ('tenant', 'tenants', 'roles_for_user')}
|
(2,): ('tenant', 'tenants', 'roles_for_user')}
|
||||||
for auth_version, auth_version_mapping in auth_dispatch.items():
|
for auth_version, auth_version_mapping in auth_dispatch.items():
|
||||||
|
@@ -20,13 +20,21 @@ from oslo_config import cfg
|
|||||||
from cloudkitty import fetcher
|
from cloudkitty import fetcher
|
||||||
|
|
||||||
|
|
||||||
SOURCE_FETCHER_OPTS = 'source_fetcher'
|
# NOTE(mc): The deprecated section should be removed in a future release.
|
||||||
source_fetcher_opts = [
|
FETCHER_SOURCE_OPTS = 'fetcher_source'
|
||||||
cfg.ListOpt('sources',
|
DEPRECATED_FETCHER_SOURCE_OPTS = 'source_fetcher'
|
||||||
default=list(),
|
|
||||||
help='list of source identifiers'), ]
|
fetcher_source_opts = [
|
||||||
|
cfg.ListOpt(
|
||||||
|
'sources',
|
||||||
|
default=list(),
|
||||||
|
help='list of source identifiers',
|
||||||
|
deprecated_group=DEPRECATED_FETCHER_SOURCE_OPTS,
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
|
cfg.CONF.register_opts(fetcher_source_opts, FETCHER_SOURCE_OPTS)
|
||||||
|
|
||||||
cfg.CONF.register_opts(source_fetcher_opts, SOURCE_FETCHER_OPTS)
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
@@ -36,4 +44,4 @@ class SourceFetcher(fetcher.BaseFetcher):
|
|||||||
name = 'source'
|
name = 'source'
|
||||||
|
|
||||||
def get_tenants(self):
|
def get_tenants(self):
|
||||||
return CONF.source_fetcher.sources
|
return CONF.fetcher_source.sources
|
||||||
|
@@ -26,16 +26,23 @@ from cloudkitty.storage.v1.hybrid import models
|
|||||||
from cloudkitty import utils as ck_utils
|
from cloudkitty import utils as ck_utils
|
||||||
|
|
||||||
|
|
||||||
|
# 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 = [
|
storage_opts = [
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'backend',
|
'backend',
|
||||||
default='gnocchi',
|
default='gnocchi',
|
||||||
help='Name of the storage backend that should be used '
|
help='Name of the storage backend that should be used '
|
||||||
'by the hybrid storage')
|
'by the hybrid storage',
|
||||||
|
deprecated_group=DEPRECATED_STORAGE_HYBRID_OPTS,
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(storage_opts, group='hybrid_storage')
|
|
||||||
|
CONF.register_opts(storage_opts, group=STORAGE_HYBRID_OPTS)
|
||||||
|
|
||||||
HYBRID_BACKENDS_NAMESPACE = 'cloudkitty.storage.hybrid.backends'
|
HYBRID_BACKENDS_NAMESPACE = 'cloudkitty.storage.hybrid.backends'
|
||||||
|
|
||||||
@@ -53,7 +60,7 @@ class HybridStorage(BaseStorage):
|
|||||||
super(HybridStorage, self).__init__(**kwargs)
|
super(HybridStorage, self).__init__(**kwargs)
|
||||||
self._hybrid_backend = driver.DriverManager(
|
self._hybrid_backend = driver.DriverManager(
|
||||||
HYBRID_BACKENDS_NAMESPACE,
|
HYBRID_BACKENDS_NAMESPACE,
|
||||||
cfg.CONF.hybrid_storage.backend,
|
cfg.CONF.storage_hybrid.backend,
|
||||||
invoke_on_load=True).driver
|
invoke_on_load=True).driver
|
||||||
self._sql_session = {}
|
self._sql_session = {}
|
||||||
|
|
||||||
|
@@ -74,11 +74,11 @@ class KeystoneFetcherTest(tests.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(KeystoneFetcherTest, self).setUp()
|
super(KeystoneFetcherTest, self).setUp()
|
||||||
self.conf.set_override('backend', 'keystone', 'tenant_fetcher')
|
self.conf.set_override('backend', 'keystone', 'tenant_fetcher')
|
||||||
self.conf.import_group('keystone_fetcher',
|
self.conf.import_group('fetcher_keystone',
|
||||||
'cloudkitty.fetcher.keystone')
|
'cloudkitty.fetcher.keystone')
|
||||||
|
|
||||||
@unittest.SkipTest
|
@unittest.SkipTest
|
||||||
def test_keystone_fetcher_filter_list(self):
|
def test_fetcher_keystone_filter_list(self):
|
||||||
kclient = 'keystoneclient.client.Client'
|
kclient = 'keystoneclient.client.Client'
|
||||||
with mock.patch(kclient) as kclientmock:
|
with mock.patch(kclient) as kclientmock:
|
||||||
kclientmock.return_value = Client()
|
kclientmock.return_value = Client()
|
||||||
|
@@ -43,7 +43,7 @@ class OrchestratorTest(tests.TestCase):
|
|||||||
messaging_conf = self.useFixture(conffixture.ConfFixture(self.conf))
|
messaging_conf = self.useFixture(conffixture.ConfFixture(self.conf))
|
||||||
messaging_conf.transport_url = 'fake:/'
|
messaging_conf.transport_url = 'fake:/'
|
||||||
self.conf.set_override('backend', 'keystone', 'fetcher')
|
self.conf.set_override('backend', 'keystone', 'fetcher')
|
||||||
self.conf.import_group('keystone_fetcher',
|
self.conf.import_group('fetcher_keystone',
|
||||||
'cloudkitty.fetcher.keystone')
|
'cloudkitty.fetcher.keystone')
|
||||||
|
|
||||||
def setup_fake_modules(self):
|
def setup_fake_modules(self):
|
||||||
|
@@ -159,8 +159,8 @@ function configure_cloudkitty {
|
|||||||
iniset $CLOUDKITTY_CONF authinfos project_domain_name default
|
iniset $CLOUDKITTY_CONF authinfos project_domain_name default
|
||||||
iniset $CLOUDKITTY_CONF authinfos debug "$ENABLE_DEBUG_LOG_LEVEL"
|
iniset $CLOUDKITTY_CONF authinfos debug "$ENABLE_DEBUG_LOG_LEVEL"
|
||||||
|
|
||||||
iniset $CLOUDKITTY_CONF keystone_fetcher auth_section authinfos
|
iniset $CLOUDKITTY_CONF fetcher_keystone auth_section authinfos
|
||||||
iniset $CLOUDKITTY_CONF keystone_fetcher keystone_version 3
|
iniset $CLOUDKITTY_CONF fetcher_keystone keystone_version 3
|
||||||
|
|
||||||
# collect
|
# collect
|
||||||
iniset $CLOUDKITTY_CONF collect collector $CLOUDKITTY_COLLECTOR
|
iniset $CLOUDKITTY_CONF collect collector $CLOUDKITTY_COLLECTOR
|
||||||
|
@@ -69,7 +69,7 @@ The following shows the basic configuration items:
|
|||||||
[database]
|
[database]
|
||||||
connection = mysql+pymysql://CK_DBUSER:CK_DBPASSWORD@DB_HOST/cloudkitty
|
connection = mysql+pymysql://CK_DBUSER:CK_DBPASSWORD@DB_HOST/cloudkitty
|
||||||
|
|
||||||
[keystone_fetcher]
|
[fetcher_keystone]
|
||||||
auth_section = ks_auth
|
auth_section = ks_auth
|
||||||
keystone_version = 3
|
keystone_version = 3
|
||||||
|
|
||||||
@@ -96,13 +96,7 @@ available: ``sqlalchemy`` and ``hybrid`` (SQLalchemy being the recommended one).
|
|||||||
As you will see in the following example, collector and storage backends
|
As you will see in the following example, collector and storage backends
|
||||||
sometimes need additional configuration sections. (The tenant fetcher works the
|
sometimes need additional configuration sections. (The tenant fetcher works the
|
||||||
same way). The section's name has the following format:
|
same way). The section's name has the following format:
|
||||||
``{backend_name}_{backend_type}`` (``gnocchi_collector`` for example), except
|
``{backend_type}_{backend_name}`` (``collector_gnocchi`` for example).
|
||||||
for ``storage_gnocchi``.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The section name format should become ``{backend_type}_{backend_name}`` for
|
|
||||||
all sections in the future (``storage_gnocchi`` style).
|
|
||||||
|
|
||||||
If you want to use the hybrid storage with a gnocchi backend, add the following
|
If you want to use the hybrid storage with a gnocchi backend, add the following
|
||||||
entry:
|
entry:
|
||||||
@@ -126,7 +120,7 @@ without modifying source code or Cloudkitty configuration file.
|
|||||||
[collect]
|
[collect]
|
||||||
metrics_conf = /etc/cloudkitty/metrics.yml
|
metrics_conf = /etc/cloudkitty/metrics.yml
|
||||||
|
|
||||||
[gnocchi_collector]
|
[collector_gnocchi]
|
||||||
auth_section = ks_auth
|
auth_section = ks_auth
|
||||||
|
|
||||||
The ``/etc/cloudkitty/metrics.yml`` file looks like this:
|
The ``/etc/cloudkitty/metrics.yml`` file looks like this:
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The 'gnocchi_collector', 'hybrid_storage', 'keystone_fetcher' and 'source_fetcher' group names have been deprecated and will be removed
|
||||||
|
in the future. Use the 'collector_gnocchi', 'storage_hybrid', 'fetcher_keystone' and 'fetcher_source' group names instead.
|
Reference in New Issue
Block a user