conf: added notifications group

Notifications related configuration options have been moved from the
default group to the ``notifications`` group.
Also, ``default_notification_level`` has been renamed to avoid naming
redundancy.

Blueprint centralize-config-options-ocata

Change-Id: I09dc358fabc84f7bf37d40d48b0652a10d9b8903
This commit is contained in:
Maciej Szankin
2016-11-01 13:56:50 +01:00
parent 53b46aa794
commit c5cb7e459c
10 changed files with 69 additions and 36 deletions

View File

@@ -75,12 +75,12 @@ def init(conf):
NOTIFICATION_TRANSPORT = messaging.get_notification_transport(
conf, allowed_remote_exmods=exmods, aliases=TRANSPORT_ALIASES)
serializer = RequestContextSerializer(JsonPayloadSerializer())
if conf.notification_format == 'unversioned':
if conf.notifications.notification_format == 'unversioned':
LEGACY_NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
serializer=serializer)
NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
serializer=serializer, driver='noop')
elif conf.notification_format == 'both':
elif conf.notifications.notification_format == 'both':
LEGACY_NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
serializer=serializer)
NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,