Merge "Bug Fix: Parses notifier configuration options"
This commit is contained in:
commit
e6f2f2b6fe
|
@ -54,6 +54,14 @@ def register_opts(conf=None):
|
|||
m.register_opts(conf)
|
||||
|
||||
|
||||
def register_enabled_plugin_opts(conf=None):
|
||||
if conf is None:
|
||||
conf = CONF
|
||||
for enabled_plugin in conf.notification_types.enabled:
|
||||
ep_module = importutils.import_module(".".join(enabled_plugin.split(".")[:-1]))
|
||||
ep_module.register_opts(conf)
|
||||
|
||||
|
||||
def list_opts():
|
||||
opts = collections.defaultdict(list)
|
||||
for m in CONF_OPTS:
|
||||
|
|
|
@ -45,6 +45,9 @@ def parse_args(argv, no_yaml=False):
|
|||
monasca-notification is an engine responsible for
|
||||
transforming alarm transitions into proper notifications
|
||||
''')
|
||||
|
||||
conf.register_enabled_plugin_opts(CONF)
|
||||
|
||||
log.setup(CONF,
|
||||
product_name='monasca-notification',
|
||||
version=version.version_string)
|
||||
|
|
Loading…
Reference in New Issue