Merge "Expose parameter to customize [oslo_messaging_notifications] retry"

This commit is contained in:
Zuul 2024-09-30 13:43:14 +00:00 committed by Gerrit Code Review
commit 5e0d716491
3 changed files with 15 additions and 1 deletions

View File

@ -58,6 +58,11 @@
# (optional) Topics to use for oslo messaging notifications backend. # (optional) Topics to use for oslo messaging notifications backend.
# Defaults to $facts['os_service_default'] # 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'].
#
# [*rabbit_use_ssl*] # [*rabbit_use_ssl*]
# (optional) Connect over SSL for RabbitMQ # (optional) Connect over SSL for RabbitMQ
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
@ -265,6 +270,7 @@ class barbican::api (
$notification_transport_url = $facts['os_service_default'], $notification_transport_url = $facts['os_service_default'],
$notification_driver = $facts['os_service_default'], $notification_driver = $facts['os_service_default'],
$notification_topics = $facts['os_service_default'], $notification_topics = $facts['os_service_default'],
$notification_retry = $facts['os_service_default'],
$rabbit_use_ssl = $facts['os_service_default'], $rabbit_use_ssl = $facts['os_service_default'],
$rabbit_heartbeat_timeout_threshold = $facts['os_service_default'], $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
$rabbit_heartbeat_rate = $facts['os_service_default'], $rabbit_heartbeat_rate = $facts['os_service_default'],
@ -361,6 +367,7 @@ class barbican::api (
driver => $notification_driver, driver => $notification_driver,
transport_url => $notification_transport_url, transport_url => $notification_transport_url,
topics => $notification_topics, topics => $notification_topics,
retry => $notification_retry,
} }
# queue options # queue options

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``barbican::api::notification_retry`` parameter has been added.

View File

@ -31,6 +31,7 @@ describe 'barbican::api' do
:notification_transport_url => '<SERVICE DEFAULT>', :notification_transport_url => '<SERVICE DEFAULT>',
:notification_driver => '<SERVICE DEFAULT>', :notification_driver => '<SERVICE DEFAULT>',
:notification_topics => '<SERVICE DEFAULT>', :notification_topics => '<SERVICE DEFAULT>',
:notification_retry => '<SERVICE DEFAULT>',
:rabbit_use_ssl => '<SERVICE DEFAULT>', :rabbit_use_ssl => '<SERVICE DEFAULT>',
:rabbit_heartbeat_timeout_threshold => '<SERVICE DEFAULT>', :rabbit_heartbeat_timeout_threshold => '<SERVICE DEFAULT>',
:rabbit_heartbeat_rate => '<SERVICE DEFAULT>', :rabbit_heartbeat_rate => '<SERVICE DEFAULT>',
@ -82,6 +83,7 @@ describe 'barbican::api' do
:notification_transport_url => 'rabbit://bugs:bugs_bunny@localhost:1234/rabbithost', :notification_transport_url => 'rabbit://bugs:bugs_bunny@localhost:1234/rabbithost',
:notification_driver => 'kombu', :notification_driver => 'kombu',
:notification_topics => 'notifications', :notification_topics => 'notifications',
:notification_retry => 10,
:rabbit_use_ssl => true, :rabbit_use_ssl => true,
:rabbit_heartbeat_timeout_threshold => '10', :rabbit_heartbeat_timeout_threshold => '10',
:rabbit_heartbeat_rate => '10', :rabbit_heartbeat_rate => '10',
@ -169,7 +171,8 @@ describe 'barbican::api' do
is_expected.to contain_oslo__messaging__notifications('barbican_config').with( is_expected.to contain_oslo__messaging__notifications('barbican_config').with(
:transport_url => param_hash[:notification_transport_url], :transport_url => param_hash[:notification_transport_url],
:driver => param_hash[:notification_driver], :driver => param_hash[:notification_driver],
:topics => param_hash[:notification_topics] :topics => param_hash[:notification_topics],
:retry => param_hash[:notification_retry],
) )
is_expected.to contain_oslo__messaging__rabbit('barbican_config').with( is_expected.to contain_oslo__messaging__rabbit('barbican_config').with(
:rabbit_use_ssl => param_hash[:rabbit_use_ssl], :rabbit_use_ssl => param_hash[:rabbit_use_ssl],