Add notification_topics option

Add notification_topics to configure AMQP topic used for OpenStack
notifications.

Change-Id: Ib441d091b87685f3da77e18b7062fa0fdf116751
This commit is contained in:
ZhongShengping 2017-02-20 20:45:43 +08:00
parent 7c86b14059
commit bf2d2fe504
3 changed files with 13 additions and 0 deletions

View File

@ -188,6 +188,10 @@
# Value can be a string or a list.
# Defaults to $::os_service_default
#
# [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications
# Defaults to ::os_service_default
#
# [*keystone_ec2_uri*]
#
# [*database_connection*]
@ -365,6 +369,7 @@ class heat(
$max_json_body_size = $::os_service_default,
$notification_transport_url = $::os_service_default,
$notification_driver = $::os_service_default,
$notification_topics = $::os_service_default,
$enable_proxy_headers_parsing = $::os_service_default,
$heat_clients_url = $::os_service_default,
$purge_config = false,
@ -498,6 +503,7 @@ deprecated. Please use heat::default_transport_url instead.")
oslo::messaging::notifications { 'heat_config':
transport_url => $notification_transport_url,
driver => $notification_driver,
topics => $notification_topics,
}
oslo::messaging::default { 'heat_config':

View File

@ -0,0 +1,4 @@
---
features:
- Add new parameter "notification_topics", AMQP topic used
for OpenStack notifications.

View File

@ -159,6 +159,7 @@ describe 'heat' do
it 'configures notification_driver' do
is_expected.to contain_heat_config('oslo_messaging_notifications/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_notifications/driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_notifications/topics').with_value('<SERVICE DEFAULT>')
end
it 'sets default value for http_proxy_to_wsgi middleware' do
@ -429,12 +430,14 @@ describe 'heat' do
params.merge!(
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'bar.foo.rpc_notifier',
:notification_topics => 'messagingv2',
)
end
it 'has notification_driver set when specified' do
is_expected.to contain_heat_config('oslo_messaging_notifications/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_heat_config('oslo_messaging_notifications/driver').with_value('bar.foo.rpc_notifier')
is_expected.to contain_heat_config('oslo_messaging_notifications/topics').with_value('messagingv2')
end
end