From 5189249185819c1c781b8b9ae13c16f0ea9c81f3 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Sat, 21 Jan 2017 16:25:25 +0800 Subject: [PATCH] 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 --- manifests/init.pp | 16 +++++++++++++++- ...ging_default_parameters-11598a3e99fe3496.yaml | 7 +++++++ spec/classes/aodh_init_spec.rb | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add_messaging_default_parameters-11598a3e99fe3496.yaml diff --git a/manifests/init.pp b/manifests/init.pp index ad71009f..aa2077c2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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': diff --git a/releasenotes/notes/add_messaging_default_parameters-11598a3e99fe3496.yaml b/releasenotes/notes/add_messaging_default_parameters-11598a3e99fe3496.yaml new file mode 100644 index 00000000..39d5e046 --- /dev/null +++ b/releasenotes/notes/add_messaging_default_parameters-11598a3e99fe3496.yaml @@ -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 diff --git a/spec/classes/aodh_init_spec.rb b/spec/classes/aodh_init_spec.rb index 67c34e6a..3ce1eb11 100644 --- a/spec/classes/aodh_init_spec.rb +++ b/spec/classes/aodh_init_spec.rb @@ -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('') + is_expected.to contain_aodh_config('DEFAULT/rpc_response_timeout').with_value('') + is_expected.to contain_aodh_config('DEFAULT/control_exchange').with_value('') is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_host').with_value('') is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_password').with_value('').with_secret(true) is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_port').with_value('')