Add notification transport_url to support dual oslo_messaging backends
Change-Id: I757a4b24f83c30fb7d237961e752845e980f1db6
This commit is contained in:
parent
22afb8bb84
commit
1defb964e6
@ -92,6 +92,12 @@
|
|||||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*notification_transport_url*]
|
||||||
|
# (optional) A URL representing the messaging driver to use for notifications
|
||||||
|
# and its full configuration. Transport URLs take the form:
|
||||||
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*rabbit_ha_queues*]
|
# [*rabbit_ha_queues*]
|
||||||
# (optional) Use HA queues in RabbitMQ (x-ha-policy: all).
|
# (optional) Use HA queues in RabbitMQ (x-ha-policy: all).
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@ -218,6 +224,7 @@ class mistral(
|
|||||||
$control_exchange = $::os_service_default,
|
$control_exchange = $::os_service_default,
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $::os_service_default,
|
||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
|
$notification_transport_url = $::os_service_default,
|
||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $::os_service_default,
|
||||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||||
$rabbit_heartbeat_rate = $::os_service_default,
|
$rabbit_heartbeat_rate = $::os_service_default,
|
||||||
@ -295,6 +302,10 @@ deprecated. Please use mistral::default_transport_url instead.")
|
|||||||
rpc_response_timeout => $rpc_response_timeout,
|
rpc_response_timeout => $rpc_response_timeout,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oslo::messaging::notifications {'mistral_config':
|
||||||
|
transport_url => $notification_transport_url,
|
||||||
|
}
|
||||||
|
|
||||||
if $rpc_backend in [$::os_service_default, 'rabbit'] {
|
if $rpc_backend in [$::os_service_default, 'rabbit'] {
|
||||||
|
|
||||||
oslo::messaging::rabbit {'mistral_config':
|
oslo::messaging::rabbit {'mistral_config':
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add olso.messaging notification transport_url via puppet-olso
|
||||||
|
resource.
|
@ -37,6 +37,8 @@ describe 'mistral' do
|
|||||||
is_expected.to contain_mistral_config('DEFAULT/rpc_response_timeout').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_mistral_config('DEFAULT/rpc_response_timeout').with(:value => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_mistral_config('DEFAULT/report_interval').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_mistral_config('DEFAULT/report_interval').with(:value => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_mistral_config('DEFAULT/service_down_time').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_mistral_config('DEFAULT/service_down_time').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_mistral_config('DEFAULT/transport_url').with(:value => '<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_mistral_config('oslo_messaging_notifications/transport_url').with(:value => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_password').with(:value => '<SERVICE DEFAULT>', :secret => true)
|
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_password').with(:value => '<SERVICE DEFAULT>', :secret => true)
|
||||||
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
|
||||||
@ -106,7 +108,7 @@ describe 'mistral' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with rabbit transport url configured' do
|
describe 'with rabbit default transport url configured' do
|
||||||
let :params do
|
let :params do
|
||||||
req_params.merge({'default_transport_url' => 'rabbit://user:pass@host:1234/virt' })
|
req_params.merge({'default_transport_url' => 'rabbit://user:pass@host:1234/virt' })
|
||||||
end
|
end
|
||||||
@ -116,6 +118,16 @@ describe 'mistral' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'with rabbit notification transport url configured' do
|
||||||
|
let :params do
|
||||||
|
req_params.merge({'notification_transport_url' => 'rabbit://user:pass@host:1234/virt' })
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should contain transport_url' do
|
||||||
|
is_expected.to contain_mistral_config('oslo_messaging_notifications/transport_url').with(:value => 'rabbit://user:pass@host:1234/virt')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe 'with rabbitmq heartbeats' do
|
describe 'with rabbitmq heartbeats' do
|
||||||
let :params do
|
let :params do
|
||||||
req_params.merge({'rabbit_heartbeat_timeout_threshold' => '60', 'rabbit_heartbeat_rate' => '10'})
|
req_params.merge({'rabbit_heartbeat_timeout_threshold' => '60', 'rabbit_heartbeat_rate' => '10'})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user