Support dict values for controller.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: I85004aae4bcd0ae4840a6250c0d39556aee0ea9f
This commit is contained in:
Simon Pasquier 2016-12-15 10:14:10 +01:00
parent 7a8b3bc4e2
commit 2ee8c65d19
1 changed files with 6 additions and 3 deletions

View File

@ -56,15 +56,18 @@ service_down_time = 90
instance_usage_audit = True
instance_usage_audit_period = hour
notify_on_state_change = vm_and_task_state
notification_topics=notifications
instance_usage_audit_period=hour
{% endif %}
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[oslo_messaging_notifications]
{%- if compute.notification is defined %}
{%- if compute.notification is mapping %}
driver = {{ compute.notification.get('driver', 'messagingv2') }}
{%- if compute.notification.topics is defined %}
topics = {{ compute.notification.topics }}
{%- endif %}
{%- elif compute.notification %}
driver = messagingv2
{%- endif %}