Add support for [oslo_messaging_rabbit] rabbit_stream_fanout

Change-Id: I779ae835d29b24605c1651048a46b01c0a2587b2
This commit is contained in:
Takashi Kajinami 2024-09-09 14:15:44 +09:00
parent 584440d30c
commit ac4e5ee56f
3 changed files with 15 additions and 0 deletions

View File

@ -152,6 +152,11 @@
# (Optional) Process name used by queue manager. # (Optional) Process name used by queue manager.
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# #
# [*rabbit_stream_fanout*]
# (Optional) Use stream queues in RabbitMQ (x-queue-type: stream) for
# fanout queues.
# Defaults to $facts['os_service_default']
#
define oslo::messaging::rabbit( define oslo::messaging::rabbit(
$amqp_durable_queues = $facts['os_service_default'], $amqp_durable_queues = $facts['os_service_default'],
$kombu_ssl_version = $facts['os_service_default'], $kombu_ssl_version = $facts['os_service_default'],
@ -182,6 +187,7 @@ define oslo::messaging::rabbit(
$use_queue_manager = $facts['os_service_default'], $use_queue_manager = $facts['os_service_default'],
$hostname = $facts['os_service_default'], $hostname = $facts['os_service_default'],
$processname = $facts['os_service_default'], $processname = $facts['os_service_default'],
$rabbit_stream_fanout = $facts['os_service_default'],
){ ){
$kombu_ssl_ca_certs_set = (!is_service_default($kombu_ssl_ca_certs) and ($kombu_ssl_ca_certs)) $kombu_ssl_ca_certs_set = (!is_service_default($kombu_ssl_ca_certs) and ($kombu_ssl_ca_certs))
@ -238,6 +244,7 @@ define oslo::messaging::rabbit(
'oslo_messaging_rabbit/use_queue_manager' => { value => $use_queue_manager }, 'oslo_messaging_rabbit/use_queue_manager' => { value => $use_queue_manager },
'oslo_messaging_rabbit/hostname' => { value => $hostname }, 'oslo_messaging_rabbit/hostname' => { value => $hostname },
'oslo_messaging_rabbit/processname' => { value => $processname }, 'oslo_messaging_rabbit/processname' => { value => $processname },
'oslo_messaging_rabbit/rabbit_stream_fanout' => { value => $rabbit_stream_fanout },
'oslo_messaging_rabbit/ssl_ca_file' => { value => $kombu_ssl_ca_certs }, 'oslo_messaging_rabbit/ssl_ca_file' => { value => $kombu_ssl_ca_certs },
'oslo_messaging_rabbit/ssl_cert_file' => { value => $kombu_ssl_certfile }, 'oslo_messaging_rabbit/ssl_cert_file' => { value => $kombu_ssl_certfile },
'oslo_messaging_rabbit/ssl_key_file' => { value => $kombu_ssl_keyfile }, 'oslo_messaging_rabbit/ssl_key_file' => { value => $kombu_ssl_keyfile },

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``oslo::messaging::rabbit::rabbit_stream_fanout`` parmaeter has
been added.

View File

@ -33,6 +33,7 @@ describe 'oslo::messaging::rabbit' do
is_expected.to contain_keystone_config('oslo_messaging_rabbit/use_queue_manager').with_value('<SERVICE DEFAULT>') is_expected.to contain_keystone_config('oslo_messaging_rabbit/use_queue_manager').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/hostname').with_value('<SERVICE DEFAULT>') is_expected.to contain_keystone_config('oslo_messaging_rabbit/hostname').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/processname').with_value('<SERVICE DEFAULT>') is_expected.to contain_keystone_config('oslo_messaging_rabbit/processname').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_stream_fanout').with_value('<SERVICE DEFAULT>')
end end
end end
@ -54,6 +55,7 @@ describe 'oslo::messaging::rabbit' do
:use_queue_manager => false, :use_queue_manager => false,
:hostname => 'node1.example.com', :hostname => 'node1.example.com',
:processname => 'procname', :processname => 'procname',
:rabbit_stream_fanout => false,
} }
end end
@ -73,6 +75,7 @@ describe 'oslo::messaging::rabbit' do
is_expected.to contain_keystone_config('oslo_messaging_rabbit/use_queue_manager').with_value(false) is_expected.to contain_keystone_config('oslo_messaging_rabbit/use_queue_manager').with_value(false)
is_expected.to contain_keystone_config('oslo_messaging_rabbit/hostname').with_value('node1.example.com') is_expected.to contain_keystone_config('oslo_messaging_rabbit/hostname').with_value('node1.example.com')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/processname').with_value('procname') is_expected.to contain_keystone_config('oslo_messaging_rabbit/processname').with_value('procname')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_stream_fanout').with_value(false)
end end
end end