diff --git a/manifests/init.pp b/manifests/init.pp index 9d5556db..0f2cffde 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,6 +17,12 @@ # If set to boolean 'false', it will not log to any directory # Defaults to undef. # +# [*default_transport_url*] +# (optional) A URL representing the messaging driver to use and its full +# configuration. Transport URLs take the form: +# transport://user:pass@host1:port[,hostN:portN]/virtual_host +# Defaults to $::os_service_default +# # [*rpc_backend*] # (Optional) Use these options to configure the message system. # Defaults to $::os_service_default. @@ -185,6 +191,12 @@ # Should be larger than max_template_size. # Defaults to $::os_service_default # +# [*notification_transport_url*] +# (optional) A URL representing the messaging driver to use for notifications +# and its full configuration. Transport URLs take the form: +# transport://user:pass@host1:port[,hostN:portN]/virtual_host +# Defaults to $::os_service_default +# # [*notification_driver*] # (Optional) Driver or drivers to handle sending notifications. # Value can be a string or a list. @@ -324,6 +336,7 @@ class heat( $keystone_project_domain_name = 'Default', $keystone_user_domain_id = 'Default', $keystone_user_domain_name = 'Default', + $default_transport_url = $::os_service_default, $rpc_backend = $::os_service_default, $rpc_response_timeout = $::os_service_default, $rabbit_host = $::os_service_default, @@ -377,6 +390,7 @@ class heat( $sync_db = undef, $max_template_size = $::os_service_default, $max_json_body_size = $::os_service_default, + $notification_transport_url = $::os_service_default, $notification_driver = $::os_service_default, $enable_proxy_headers_parsing = $::os_service_default, $heat_clients_url = $::os_service_default, @@ -502,10 +516,12 @@ class heat( } oslo::messaging::notifications { 'heat_config': - driver => $notification_driver, + transport_url => $notification_transport_url, + driver => $notification_driver, } oslo::messaging::default { 'heat_config': + transport_url => $default_transport_url, rpc_response_timeout => $rpc_response_timeout, } diff --git a/releasenotes/notes/add_transport_url_parameters-1472d30d4aaa30ba.yaml b/releasenotes/notes/add_transport_url_parameters-1472d30d4aaa30ba.yaml new file mode 100644 index 00000000..a7213685 --- /dev/null +++ b/releasenotes/notes/add_transport_url_parameters-1472d30d4aaa30ba.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add oslo.messaging transport_url parameters via puppet-oslo resource \ No newline at end of file diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index 9f660eb7..25666dd7 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -126,6 +126,7 @@ describe 'heat' do it { is_expected.to contain_heat_config('paste_deploy/flavor').with_value('keystone') } 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('') end @@ -437,11 +438,13 @@ describe 'heat' do shared_examples_for 'with notification_driver set to a string' do before do params.merge!( - :notification_driver => 'bar.foo.rpc_notifier', + :notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673', + :notification_driver => 'bar.foo.rpc_notifier', ) 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') end end