From bf2d2fe504be9bad7c7881290a4b5c16d3b1de14 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Mon, 20 Feb 2017 20:45:43 +0800 Subject: [PATCH] Add notification_topics option Add notification_topics to configure AMQP topic used for OpenStack notifications. Change-Id: Ib441d091b87685f3da77e18b7062fa0fdf116751 --- manifests/init.pp | 6 ++++++ ..._messaging_notification_parameters-451a35e983534287.yaml | 4 ++++ spec/classes/heat_init_spec.rb | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/add_messaging_notification_parameters-451a35e983534287.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 463e9e5e..e52ad432 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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': diff --git a/releasenotes/notes/add_messaging_notification_parameters-451a35e983534287.yaml b/releasenotes/notes/add_messaging_notification_parameters-451a35e983534287.yaml new file mode 100644 index 00000000..c14083e7 --- /dev/null +++ b/releasenotes/notes/add_messaging_notification_parameters-451a35e983534287.yaml @@ -0,0 +1,4 @@ +--- +features: + - Add new parameter "notification_topics", AMQP topic used + for OpenStack notifications. diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index 07b9a04a..45b5a815 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -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('') is_expected.to contain_heat_config('oslo_messaging_notifications/driver').with_value('') + is_expected.to contain_heat_config('oslo_messaging_notifications/topics').with_value('') 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