diff --git a/manifests/init.pp b/manifests/init.pp index f73513c1..f76bbbd6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -150,7 +150,7 @@ # Defaults to $facts['os_service_default'] # # [*notification_transport_url*] -# (optional) A URL representing the messaging driver to use for notifications +# (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 $facts['os_service_default'] @@ -161,9 +161,14 @@ # Defaults to $facts['os_service_default'] # # [*notification_topics*] -# (optional) AMQP topic used for OpenStack notifications +# (Optional) AMQP topic used for OpenStack notifications # Defaults to facts['os_service_default'] # +# [*notification_retry*] +# (Optional) The maximum number of attempts to re-sent a notification +# message, which failed to be delivered due to a recoverable error. +# Defaults to $facts['os_service_default']. +# # [*keystone_ec2_uri*] # (optional) Authentication Endpoint URI for ec2 service. # Defaults to facts['os_service_default'] @@ -253,6 +258,7 @@ class heat( $notification_transport_url = $facts['os_service_default'], $notification_driver = $facts['os_service_default'], $notification_topics = $facts['os_service_default'], + $notification_retry = $facts['os_service_default'], $enable_proxy_headers_parsing = $facts['os_service_default'], $max_request_body_size = $facts['os_service_default'], Boolean $purge_config = false, @@ -320,6 +326,7 @@ class heat( transport_url => $notification_transport_url, driver => $notification_driver, topics => $notification_topics, + retry => $notification_retry, } oslo::messaging::default { 'heat_config': diff --git a/releasenotes/notes/notification-retry-11e012a40f003694.yaml b/releasenotes/notes/notification-retry-11e012a40f003694.yaml new file mode 100644 index 00000000..01a47c92 --- /dev/null +++ b/releasenotes/notes/notification-retry-11e012a40f003694.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``heat::notification_retry`` parameter has been added. diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index bf1695c4..a249ef6f 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -44,7 +44,7 @@ describe 'heat' do it_configures 'without region_name set' it_configures 'with enable_stack_adopt and enable_stack_abandon set' it_configures 'with overridden messaging default parameters' - it_configures 'with notification_driver set to a string' + it_configures 'with notification parameters' end shared_examples_for 'a heat base installation' do @@ -112,7 +112,8 @@ describe 'heat' do is_expected.to contain_oslo__messaging__notifications('heat_config').with( :driver => '', :transport_url => '', - :topics => '' + :topics => '', + :retry => '', ) end @@ -311,12 +312,13 @@ describe 'heat' do end end - shared_examples_for 'with notification_driver set to a string' do + shared_examples_for 'with notification parameters' do before do params.merge!( :notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673', :notification_driver => 'messagingv2', :notification_topics => 'notifications', + :notification_retry => 10, ) end @@ -324,7 +326,8 @@ describe 'heat' do is_expected.to contain_oslo__messaging__notifications('heat_config').with( :driver => 'messagingv2', :transport_url => 'rabbit://rabbit_user:password@localhost:5673', - :topics => 'notifications' + :topics => 'notifications', + :retry => 10, ) end end