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: I5cc00df1f9483d24c2b3656c7a7722918af94ffd
diff --git a/keystone/files/liberty/keystone.conf.Debian b/keystone/files/liberty/keystone.conf.Debian
index a0e4d5e..9f6c9c2 100644
--- a/keystone/files/liberty/keystone.conf.Debian
+++ b/keystone/files/liberty/keystone.conf.Debian
@@ -233,10 +233,16 @@
 
 # The Drivers(s) to handle sending notifications. Possible values are
 # messaging, messagingv2, routing, log, test, noop (multi valued)
-{%- if server.notification %}
 #notification_driver=
+{%- 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 %}
+
 # AMQP topic used for OpenStack notifications. (list value)
 # Deprecated group/name - [rpc_notifier2]/topics
 #notification_topics = notifications
diff --git a/keystone/files/mitaka/keystone.conf.Debian b/keystone/files/mitaka/keystone.conf.Debian
index 232f091..d48f485 100644
--- a/keystone/files/mitaka/keystone.conf.Debian
+++ b/keystone/files/mitaka/keystone.conf.Debian
@@ -1475,7 +1475,12 @@
 # messaging, messagingv2, routing, log, test, noop (multi valued)
 # Deprecated group/name - [DEFAULT]/notification_driver
 #driver =
-{%- if server.notification %}
+{%- if server.notification is mapping %}
+driver = {{ server.notification.get('driver', 'messagingv2') }}
+{%- if server.notification.topics is defined %}
+topics = {{ server.notification.topics }}
+{%- endif %}
+{%- elif server.notification %}
 driver=messagingv2
 {%- endif %}