Merge "Add support for rabbit_transient_queues_ttl oslo_messaging config option"

This commit is contained in:
Jenkins
2016-09-01 16:18:01 +00:00
committed by Gerrit Code Review
3 changed files with 23 additions and 0 deletions

View File

@@ -171,6 +171,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
@@ -411,6 +417,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,
@@ -588,6 +595,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'
@@ -188,6 +194,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)