Expose parameter to customize [oslo_messaging_notifications] retry

The parameter has been managed by puppet-oslo, but its value could not
be set via this module.

Change-Id: Ib7c9e3f84fc558425422c4626198cccd1c433c2e
This commit is contained in:
Takashi Kajinami 2024-09-30 12:41:42 +09:00
parent f5deaaba42
commit 502d9284c4
3 changed files with 18 additions and 4 deletions

View File

@ -35,14 +35,19 @@
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $facts['os_service_default'].
#
# [*notification_driver*]
# (optional) Driver or drivers to handle sending notifications.
# Default to $facts['os_service_default']
#
# [*notification_topics*]
# (optional) AMQP topics to publish to when using the RPC notification driver.
# (list value)
# Default to $facts['os_service_default']
#
# [*notification_driver*]
# (optional) Driver or drivers to handle sending notifications.
# Default 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_ha_queues*]
# (optional) Use HA queues in RabbitMQ (x-ha-policy: all).
@ -204,6 +209,7 @@ class manila (
$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'],
$rabbit_ha_queues = $facts['os_service_default'],
$rabbit_quorum_queue = $facts['os_service_default'],
$rabbit_transient_quorum_queue = $facts['os_service_default'],
@ -292,6 +298,7 @@ class manila (
transport_url => $notification_transport_url,
driver => $notification_driver,
topics => $notification_topics,
retry => $notification_retry,
}
manila_config {

View File

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

View File

@ -31,6 +31,7 @@ describe 'manila' do
:transport_url => '<SERVICE DEFAULT>',
:driver => '<SERVICE DEFAULT>',
:topics => '<SERVICE DEFAULT>',
:retry => '<SERVICE DEFAULT>',
)
is_expected.to contain_oslo__messaging__rabbit('manila_config').with(
:rabbit_use_ssl => '<SERVICE DEFAULT>',
@ -201,6 +202,7 @@ describe 'manila' do
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'messagingv2',
:notification_topics => ['notifications'],
:notification_retry => 10,
:executor_thread_pool_size => 64,
}
end
@ -215,7 +217,8 @@ describe 'manila' do
it { is_expected.to contain_oslo__messaging__notifications('manila_config').with(
:transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:driver => 'messagingv2',
:topics => ['notifications']
:topics => ['notifications'],
:retry => 10,
) }
end
end