Add $notification_driver parameter to notify::rabbitmq

It makes possible to control the value of notification_driver setting and defaults
to 'messaging' to maintain backwards compatibility.

Change-Id: I3f2c29adbfb605ef288962f72ba81c11811cb357
(cherry picked from commit 9be4c24d98)
This commit is contained in:
Bartłomiej Piotrowski 2015-03-04 15:33:12 +01:00 committed by Colleen Murphy
parent 57685754d3
commit d3e77427bb
1 changed files with 5 additions and 1 deletions

View File

@ -35,6 +35,9 @@
# [*rabbit_durable_queues*]
# Defaults to false
#
# [*notification_driver*]
# Notification driver to use. Defaults to 'messaging'.
class glance::notify::rabbitmq(
$rabbit_password,
$rabbit_userid = 'guest',
@ -51,6 +54,7 @@ class glance::notify::rabbitmq(
$rabbit_notification_topic = 'notifications',
$rabbit_durable_queues = false,
$amqp_durable_queues = false,
$notification_driver = 'messaging',
) {
if $rabbit_durable_queues {
@ -75,7 +79,7 @@ class glance::notify::rabbitmq(
}
glance_api_config {
'DEFAULT/notification_driver': value => 'messaging';
'DEFAULT/notification_driver': value => $notification_driver;
'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host;
'DEFAULT/rabbit_password': value => $rabbit_password, secret => true;
'DEFAULT/rabbit_userid': value => $rabbit_userid;