Support dict values for server.notification

This change allows to configure the notification topic(s) and messaging
driver. It preserves backward-compatibility when the 'notification'
parameter is a boolean value instead of a dict.

Change-Id: I67990858df88c15c173d3dd995b62bda68609a4f
This commit is contained in:
Simon Pasquier 2016-12-01 14:09:25 +01:00
parent 1eb7c8d09c
commit 4b45ad654f
2 changed files with 12 additions and 2 deletions

View File

@ -172,7 +172,12 @@ stack_user_domain_name = heat_user_domain
# Driver or drivers to handle sending notifications. (multi valued)
#notification_driver =
{%- if server.notification %}
{%- if server.notification is mapping %}
notification_driver = {{ server.notification.get('driver', 'messagingv2') }}
{%- if server.notification.topics is defined %}
notification_topics = {{ server.notification.topics }}
{%- endif %}
{%- elif server.notification %}
notification_driver = messagingv2
{% endif %}

View File

@ -172,7 +172,12 @@ stack_user_domain_name = heat_user_domain
# Driver or drivers to handle sending notifications. (multi valued)
#notification_driver =
{%- if server.notification %}
{%- if server.notification is mapping %}
notification_driver = {{ server.notification.get('driver', 'messagingv2') }}
{%- if server.notification.topics is defined %}
notification_topics = {{ server.notification.topics }}
{%- endif %}
{%- elif server.notification %}
notification_driver = messagingv2
{%- endif %}