Merge "Add multi-region support for gnocchi collector"
This commit is contained in:
@@ -55,6 +55,10 @@ gcollector_opts = [
|
|||||||
default='internalURL',
|
default='internalURL',
|
||||||
help='Endpoint URL type (for keystone auth only)',
|
help='Endpoint URL type (for keystone auth only)',
|
||||||
),
|
),
|
||||||
|
cfg.StrOpt(
|
||||||
|
'region_name',
|
||||||
|
default='RegionOne',
|
||||||
|
help='Region Name'),
|
||||||
]
|
]
|
||||||
|
|
||||||
cfg.CONF.register_opts(gnocchi_collector_opts, GNOCCHI_COLLECTOR_OPTS)
|
cfg.CONF.register_opts(gnocchi_collector_opts, GNOCCHI_COLLECTOR_OPTS)
|
||||||
@@ -67,7 +71,6 @@ ks_loading.register_auth_conf_options(
|
|||||||
GNOCCHI_COLLECTOR_OPTS)
|
GNOCCHI_COLLECTOR_OPTS)
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
GNOCCHI_EXTRA_SCHEMA = {
|
GNOCCHI_EXTRA_SCHEMA = {
|
||||||
Required('extra_args'): {
|
Required('extra_args'): {
|
||||||
Required('resource_type'): All(str, Length(min=1)),
|
Required('resource_type'): All(str, Length(min=1)),
|
||||||
@@ -106,6 +109,7 @@ class GnocchiCollector(collector.BaseCollector):
|
|||||||
user=CONF.gnocchi_collector.gnocchi_user,
|
user=CONF.gnocchi_collector.gnocchi_user,
|
||||||
endpoint=CONF.gnocchi_collector.gnocchi_endpoint,
|
endpoint=CONF.gnocchi_collector.gnocchi_endpoint,
|
||||||
)
|
)
|
||||||
|
adapter_options['region_name'] = CONF.gnocchi_collector.region_name
|
||||||
self._conn = gclient.Client(
|
self._conn = gclient.Client(
|
||||||
'1',
|
'1',
|
||||||
session_options={'auth': auth_plugin},
|
session_options={'auth': auth_plugin},
|
||||||
|
Reference in New Issue
Block a user