Add default notification plugins to configuration

In the past email, pagerduty and webhook notification plugins had been
hard coded and always enabled. This situation is still reflected in the
deprecated YAML configuration file [1]. These notification method types
are also expected by tempest tests.

This change sets email, pagerduty and webhook as the default list of
enabled notifiers. This corresponds to the old behavior and testing but
can be easily modified by overwriting the list in the configuration
file.

[1] https://opendev.org/openstack/monasca-api/src/branch/master/devstack/files/monasca-notification/notification.yaml#L51-L54

Change-Id: Icb91feaf7821fe014542350125c5011bab530103
Story: 2000959
Task: 35644
This commit is contained in:
Witek Bedyk 2019-07-01 17:46:51 +02:00
parent 07da3274dc
commit fd1c6dfab9

View File

@ -30,7 +30,7 @@ notifier_group = cfg.OptGroup('notification_types',
'notifiers inside notification engine.')
notifier_opts = [
cfg.ListOpt(name='enabled', default=[],
cfg.ListOpt(name='enabled', default=['email', 'pagerduty', 'webhook'],
item_type=lambda x: _KEY_MAP.get(x, x), bounds=False,
advanced=True, sample_default=','.join(_KEY_MAP.keys()),
help='List of enabled notification types. You may specify '