Merge "Add rabbit_ha_queues option"
This commit is contained in:
commit
9feac68da1
@ -54,6 +54,10 @@
|
||||
# (Optional) Virtual_host 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.
|
||||
@ -252,6 +256,7 @@ class heat(
|
||||
$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,
|
||||
@ -340,11 +345,15 @@ class heat(
|
||||
}
|
||||
}
|
||||
|
||||
if $rabbit_ha_queues == undef {
|
||||
if size($rabbit_hosts) > 1 {
|
||||
heat_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => true }
|
||||
} else {
|
||||
heat_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => false }
|
||||
}
|
||||
} else {
|
||||
heat_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues }
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
|
||||
|
@ -178,6 +178,16 @@ describe 'heat' do
|
||||
it { is_expected.to contain_heat_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true) }
|
||||
end
|
||||
|
||||
shared_examples_for 'single rabbit_host with ha queues' do
|
||||
let :params do
|
||||
req_params.merge({'rabbit_ha_queues' => true})
|
||||
end
|
||||
|
||||
it 'should contain rabbit_ha_queues' do
|
||||
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true')
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'rabbit with heartbeat configured' do
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_heat_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_userid] )
|
||||
|
@ -30,6 +30,7 @@ describe 'heat::keystone::auth' do
|
||||
:service_type => 'orchestration',
|
||||
:region => 'RegionOne',
|
||||
:tenant => 'services',
|
||||
:configure_user_role => true,
|
||||
:public_url => 'http://127.0.0.1:8004/v1/%(tenant_id)s',
|
||||
:admin_url => 'http://127.0.0.1:8004/v1/%(tenant_id)s',
|
||||
:internal_url => 'http://127.0.0.1:8004/v1/%(tenant_id)s',
|
||||
|
Loading…
x
Reference in New Issue
Block a user