Merge "Add notification system options in trove"

This commit is contained in:
Jenkins 2016-01-26 16:02:16 +00:00 committed by Gerrit Code Review
commit f057c9b474
7 changed files with 31 additions and 0 deletions

View File

@ -342,6 +342,11 @@ class trove::api(
'DEFAULT/heat_service_type': value => $::trove::heat_service_type;
}
trove_config {
'DEFAULT/notification_driver': value => join(any2array($::trove::notification_driver, ','));
'DEFAULT/notification_topics': value => $::trove::notification_topics;
}
if $::trove::rpc_backend == 'trove.openstack.common.rpc.impl_kombu' or $::trove::rpc_backend == 'rabbit' {
if ! $::trove::rabbit_password {
fail('When rpc_backend is rabbitmq, you must set rabbit password')

View File

@ -95,6 +95,11 @@ class trove::guestagent(
trove_guestagent_config {'DEFAULT/os_region_name': ensure => absent }
}
trove_guestagent_config {
'DEFAULT/notification_driver': value => join(any2array($::trove::notification_driver, ','));
'DEFAULT/notification_topics': value => $::trove::notification_topics;
}
if $::trove::rpc_backend == 'trove.openstack.common.rpc.impl_kombu' or $::trove::rpc_backend == 'rabbit' {
if ! $::trove::rabbit_password {
fail('When rpc_backend is rabbitmq, you must set rabbit password')

View File

@ -20,6 +20,14 @@
# Trove base config
#
# == Parameters
# [*notification_driver*]
# (optional) Driver or drivers to handle sending notifications.
# Value can be a string or a list.
# Defaults to noop
#
# [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications
# Defaults to 'notifications'
#
# [*rabbit_host*]
# (optional) Location of rabbitmq installation.
@ -226,6 +234,8 @@
#
class trove(
$nova_proxy_admin_pass,
$notification_driver = 'noop',
$notification_topics = 'notifications',
$rabbit_host = 'localhost',
$rabbit_hosts = undef,
$rabbit_password = 'guest',

View File

@ -156,6 +156,11 @@ class trove::taskmanager(
'DEFAULT/heat_service_type': value => $::trove::heat_service_type;
}
trove_taskmanager_config {
'DEFAULT/notification_driver': value => join(any2array($::trove::notification_driver, ','));
'DEFAULT/notification_topics': value => $::trove::notification_topics;
}
if $::trove::rpc_backend == 'trove.openstack.common.rpc.impl_kombu' or $::trove::rpc_backend == 'rabbit'{
if ! $::trove::rabbit_password {
fail('When rpc_backend is rabbitmq, you must set rabbit password')

View File

@ -84,6 +84,8 @@ describe 'trove::api' do
is_expected.to contain_trove_config('DEFAULT/http_put_rate').with_value('200')
is_expected.to contain_trove_config('DEFAULT/http_delete_rate').with_value('200')
is_expected.to contain_trove_config('DEFAULT/http_mgmt_post_rate').with_value('200')
is_expected.to contain_trove_config('DEFAULT/notification_driver').with_value('noop,')
is_expected.to contain_trove_config('DEFAULT/notification_topics').with_value('notifications')
end
context 'with deprecated parameters' do

View File

@ -33,6 +33,8 @@ describe 'trove::guestagent' do
is_expected.to contain_trove_guestagent_config('DEFAULT/nova_proxy_admin_pass').with_value('verysecrete')
is_expected.to contain_trove_guestagent_config('DEFAULT/nova_proxy_admin_tenant_name').with_value('admin')
is_expected.to contain_trove_guestagent_config('DEFAULT/os_region_name').with_value('RegionOne')
is_expected.to contain_trove_guestagent_config('DEFAULT/notification_driver').with_value('noop,')
is_expected.to contain_trove_guestagent_config('DEFAULT/notification_topics').with_value('notifications')
end
context 'when using a single RabbitMQ server' do

View File

@ -66,6 +66,8 @@ describe 'trove::taskmanager' do
is_expected.to contain_trove_taskmanager_config('DEFAULT/neutron_service_type').with_value('network')
is_expected.to contain_trove_config('DEFAULT/taskmanager_queue').with_value('taskmanager')
is_expected.to contain_file('/etc/trove/trove-guestagent.conf')
is_expected.to contain_trove_taskmanager_config('DEFAULT/notification_driver').with_value('noop,')
is_expected.to contain_trove_taskmanager_config('DEFAULT/notification_topics').with_value('notifications')
end
context 'when set use_guestagent_template to false' do