# (Optional) virtualhost to use.
# Defaults to '/'.
#
+# [*rabbit_ha_queues*]
+# (Optional) Use HA queues in RabbitMQ (x-ha-policy: all).
+# Defaults to undef.
+#
# [*rabbit_heartbeat_timeout_threshold*]
# (Optional) Number of seconds after which the RabbitMQ broker is considered
# down if the heartbeat keepalive fails. Any value >0 enables heartbeats.
$rabbit_userid = 'guest',
$rabbit_password = '',
$rabbit_virtual_host = '/',
+ $rabbit_ha_queues = undef,
$rabbit_heartbeat_timeout_threshold = 0,
$rabbit_heartbeat_rate = 2,
$rabbit_use_ssl = false,
}
}
+ if $rabbit_ha_queues == undef {
if size($rabbit_hosts) > 1 {
ceilometer_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => true }
} else {
ceilometer_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => false }
}
+ } else {
+ ceilometer_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues }
+ }
ceilometer_config {
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
it_configures 'rabbit with SSL support'
it_configures 'rabbit without HA support (with backward compatibility)'
it_configures 'rabbit with connection heartbeats'
+
+ context 'with rabbit_ha_queues' do
+ before { params.merge!( rabbit_params ).merge!( :rabbit_ha_queues => true ) }
+ it_configures 'rabbit with rabbit_ha_queues'
+ end
+
end
context 'with rabbit_hosts parameter' do
end
+ shared_examples_for 'rabbit with rabbit_ha_queues' do
+
+ it 'configures rabbit' do
+ is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value( params[:rabbit_ha_queues] )
+ end
+ end
+
shared_examples_for 'rabbit with HA support' do
it 'configures rabbit' do