diff --git a/manifests/init.pp b/manifests/init.pp index 28dbd3b..fb1caad 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -120,7 +120,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'] @@ -131,9 +131,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']. +# # [*purge_config*] # (optional) Whether to set only the specified config options # in the cloudkitty config. @@ -207,12 +212,13 @@ class cloudkitty( $kombu_failover_strategy = $facts['os_service_default'], $kombu_compression = $facts['os_service_default'], $amqp_durable_queues = $facts['os_service_default'], - $notification_driver = $facts['os_service_default'], - $notification_topics = $facts['os_service_default'], $default_transport_url = $facts['os_service_default'], $rpc_response_timeout = $facts['os_service_default'], $control_exchange = $facts['os_service_default'], $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'], Boolean $purge_config = false, $auth_strategy = 'keystone', $api_paste_config = $facts['os_service_default'], @@ -274,6 +280,7 @@ class cloudkitty( transport_url => $notification_transport_url, driver => $notification_driver, topics => $notification_topics, + retry => $notification_retry, } cloudkitty_config { diff --git a/releasenotes/notes/notification-retry-06683013b8bbac04.yaml b/releasenotes/notes/notification-retry-06683013b8bbac04.yaml new file mode 100644 index 0000000..57370ca --- /dev/null +++ b/releasenotes/notes/notification-retry-06683013b8bbac04.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``cloudkitty::notification_retry`` parameter has been added. diff --git a/spec/classes/cloudkitty_init_spec.rb b/spec/classes/cloudkitty_init_spec.rb index d0ea50d..029d00b 100644 --- a/spec/classes/cloudkitty_init_spec.rb +++ b/spec/classes/cloudkitty_init_spec.rb @@ -51,7 +51,8 @@ describe 'cloudkitty' do is_expected.to contain_oslo__messaging__notifications('cloudkitty_config').with( :transport_url => '', :driver => '', - :topics => '' + :topics => '', + :retry => '', ) end @@ -84,11 +85,13 @@ describe 'cloudkitty' do :amqp_durable_queues => true, :kombu_compression => 'gzip', :package_ensure => '2012.1.1-15.el6', - :notification_driver => 'messagingv1', - :notification_topics => 'openstack', :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673', :rpc_response_timeout => '120', :control_exchange => 'cloudkitty', + :notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673', + :notification_driver => 'messagingv1', + :notification_topics => 'openstack', + :notification_retry => 10, :storage_backend => 'gnocchi', :storage_version => '1', } @@ -115,9 +118,10 @@ describe 'cloudkitty' do :enable_cancel_on_failover => false, ) is_expected.to contain_oslo__messaging__notifications('cloudkitty_config').with( - :transport_url => '', + :transport_url => 'rabbit://rabbit_user:password@localhost:5673', :driver => 'messagingv1', - :topics => 'openstack' + :topics => 'openstack', + :retry => 10, ) end