Add control_exchange and rpc_response_timeout options

Add control_exchange to configure an exchange name for message.
Add rpc_response_timeout to configure seconds time for waiting
for a response from a call.

Change-Id: I980d8a4532a90b2d94ebcfa06578616f09f23c6c
This commit is contained in:
ZhongShengping 2017-01-21 16:25:25 +08:00
parent b43dbd8689
commit 5189249185
3 changed files with 24 additions and 1 deletions

View File

@ -19,6 +19,16 @@
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default
#
# [*rpc_response_timeout*]
# (Optional) Seconds to wait for a response from a call.
# Defaults to $::os_service_default
#
# [*control_exchange*]
# (Optional) The default exchange under which topics are scoped. May be
# overridden by an exchange name specified in the transport_url
# option.
# Defaults to $::os_service_default
#
# [*rpc_backend*]
# (optional) The rpc backend implementation to use, can be:
# amqp (for AMQP 1.0 protocol)
@ -254,6 +264,8 @@ class aodh (
$ensure_package = 'present',
$alarm_history_time_to_live = $::os_service_default,
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$control_exchange = $::os_service_default,
$rpc_backend = 'rabbit',
$rabbit_use_ssl = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
@ -377,7 +389,9 @@ deprecated. Please use aodh::default_transport_url instead.")
}
oslo::messaging::default { 'aodh_config':
transport_url => $default_transport_url,
transport_url => $default_transport_url,
rpc_response_timeout => $rpc_response_timeout,
control_exchange => $control_exchange,
}
oslo::messaging::notifications { 'aodh_config':

View File

@ -0,0 +1,7 @@
---
features:
- Add new parameter "control_exchange", the default exchange under
which topics are scoped. May be overridden by an exchange name
specified in the transport_url option.
- Add new parameter "rpc_response_timeout", seconds to wait for a
response from a call

View File

@ -28,6 +28,8 @@ describe 'aodh' do
it 'configures rabbit' do
is_expected.to contain_aodh_config('DEFAULT/rpc_backend').with_value('rabbit')
is_expected.to contain_aodh_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')