Merge "Bug Fix: Parses notifier configuration options"

This commit is contained in:
Zuul 2019-01-31 18:07:18 +00:00 committed by Gerrit Code Review
commit e6f2f2b6fe
2 changed files with 11 additions and 0 deletions

View File

@ -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:

View File

@ -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)