Add hook to get Aodh config options

Aodh is using a local config object as opposed to the global
cfg.CONF. A function is added to the hooks.py file to address this
issue.

Change-Id: I88d9c075c8255ffec4659b260fbe6173904f892d
This commit is contained in:
Ildiko Vancsa 2015-09-23 15:24:29 +02:00
parent 42511b5d09
commit 2b74907eaf
1 changed files with 14 additions and 1 deletions

View File

@ -62,7 +62,20 @@ def nova_spice():
import nova.cmd.spicehtml5proxy # noqa
def aodh_config():
# Aodh uses a local conf object, therefore we need to use the same method
# here to populate the global cfg.CONF object used by the script.
import aodh.opts as opts
from oslo_config import cfg
cfg.CONF = cfg.ConfigOpts()
for group, options in opts.list_opts():
cfg.CONF.register_opts(list(options),
group=None if group == "DEFAULT" else group)
HOOKS = {'keystone.common.config': keystone_config,
'glance.common.config': glance_store_config,
'neutron': neutron_misc,
'nova.spice': nova_spice}
'nova.spice': nova_spice,
'aodh': aodh_config}