Add support for rabbit_transient_queues_ttl oslo_messaging config option

Change-Id: I7f4dd75a4e67363ac756ee7ec995422b947cd18b
This commit is contained in:
Sam Morrison 2016-08-01 11:19:09 +10:00
parent 8a85bb0860
commit ab5bc16462
3 changed files with 23 additions and 0 deletions

View File

@ -179,6 +179,12 @@
# (optional) Connect over SSL for RabbitMQ
# Defaults to $::os_service_default
#
# [*rabbit_transient_queues_ttl*]
# (optional) Positive integer representing duration in seconds for queue
# TTL (x-expires). Queues which are unused for the duration of the TTL are
# automatically deleted. The parameter affects only reply and fanout queues.
# Defaults to $::os_service_default
#
# [*amqp_durable_queues*]
# (optional) Define queues as "durable" to rabbitmq.
# Defaults to $::os_service_default
@ -415,6 +421,7 @@ class neutron (
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
$rabbit_heartbeat_rate = $::os_service_default,
$rabbit_use_ssl = $::os_service_default,
$rabbit_transient_queues_ttl = $::os_service_default,
$amqp_durable_queues = $::os_service_default,
$kombu_ssl_ca_certs = $::os_service_default,
$kombu_ssl_certfile = $::os_service_default,
@ -585,6 +592,7 @@ class neutron (
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
heartbeat_rate => $rabbit_heartbeat_rate,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_transient_queues_ttl => $rabbit_transient_queues_ttl,
kombu_reconnect_delay => $kombu_reconnect_delay,
kombu_missing_consumer_retry_timeout => $kombu_missing_consumer_retry_timeout,
kombu_failover_strategy => $kombu_failover_strategy,

View File

@ -0,0 +1,3 @@
---
features:
- Add oslo.messaging rabbit_transient_queues_ttl parameter support.

View File

@ -69,6 +69,12 @@ describe 'neutron' do
it_configures 'rabbit with durable queues'
end
context 'with rabbitmq non default transient_queues_ttl' do
before { params.merge!( :rabbit_transient_queues_ttl => 20 ) }
it_configures 'rabbit with non default transient_queues_ttl'
end
it_configures 'with SSL enabled with kombu'
it_configures 'with SSL enabled without kombu'
it_configures 'with SSL disabled'
@ -190,6 +196,12 @@ describe 'neutron' do
end
end
shared_examples_for 'rabbit with non default transient_queues_ttl' do
it 'in neutron.conf' do
is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_transient_queues_ttl').with_value(20)
end
end
shared_examples_for 'rabbit_ha_queues set to false' do
it 'in neutron.conf' do
is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(false)