Browse Source

Add rabbit_qos_prefetch_count to oslo_messaging_rabbit

Change-Id: Ib301df384d271da27094376389e981fe51e39e5f
changes/97/464997/1
Jake Yip 5 years ago
parent
commit
d46d726ae2
  1. 6
      manifests/messaging/rabbit.pp
  2. 3
      spec/defines/oslo_messaging_rabbit_spec.rb

6
manifests/messaging/rabbit.pp

@ -63,6 +63,10 @@
# (port value)
# Defaults to $::os_service_default
#
# [*rabbit_qos_prefetch_count*]
# (Optional) Specifies the number of messages to prefetch
# Defaults to $::os_service_default
#
# [*rabbit_hosts*]
# (Optional) RabbitMQ HA cluster host:port pairs. (array value)
# Defaults to $::os_service_default
@ -142,6 +146,7 @@ define oslo::messaging::rabbit(
$kombu_compression = $::os_service_default,
$rabbit_host = $::os_service_default,
$rabbit_port = $::os_service_default,
$rabbit_qos_prefetch_count = $::os_service_default,
$rabbit_hosts = $::os_service_default,
$rabbit_use_ssl = $::os_service_default,
$rabbit_userid = $::os_service_default,
@ -220,6 +225,7 @@ rabbit_password, rabbit_virtual_host parameters have been deprecated by the \
'oslo_messaging_rabbit/rabbit_virtual_host' => { value => $rabbit_virtual_host },
'oslo_messaging_rabbit/rabbit_hosts' => { value => $rabbit_hosts_orig },
'oslo_messaging_rabbit/rabbit_port' => { value => $rabbit_port_orig },
'oslo_messaging_rabbit/rabbit_qos_prefetch_count' => { value => $rabbit_qos_prefetch_count },
'oslo_messaging_rabbit/rabbit_host' => { value => $rabbit_host_orig },
'oslo_messaging_rabbit/rabbit_ha_queues' => { value => $rabbit_ha_queues_orig },
'oslo_messaging_rabbit/ssl_ca_file' => { value => $kombu_ssl_ca_certs },

3
spec/defines/oslo_messaging_rabbit_spec.rb

@ -15,6 +15,7 @@ describe 'oslo::messaging::rabbit' do
is_expected.to contain_keystone_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_hosts').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_userid').with_value('<SERVICE DEFAULT>')
@ -38,6 +39,7 @@ describe 'oslo::messaging::rabbit' do
{ :rabbit_host => 'rabbit',
:rabbit_userid => 'rabbit_user',
:rabbit_port => '5673',
:rabbit_qos_prefetch_count => '10',
:rabbit_password => 'password',
:heartbeat_timeout_threshold => '60',
:heartbeat_rate => '10',
@ -49,6 +51,7 @@ describe 'oslo::messaging::rabbit' do
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_host').with_value('rabbit')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_password').with_value('password').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value('10')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_userid').with_value('rabbit_user')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60')

Loading…
Cancel
Save