From bf49b6e306196bc401a06d54dc5ae20c4dc2a8d3 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Tue, 7 Feb 2017 09:20:11 +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: I3d0ae4d5a65b73f4db918c18521c6d7288cef136 --- manifests/init.pp | 17 ++++++++++++++++- ...ing_default_parameters-9175a1238d4615f7.yaml | 7 +++++++ spec/classes/murano_init_spec.rb | 6 ++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add_messaging_default_parameters-9175a1238d4615f7.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 4da7222..36d00a5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -41,6 +41,17 @@ # configuration. Transport URLs take the form: # 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 +# # [*rabbit_ha_queues*] # (Optional) Should murano api use ha queues # Defaults to $::os_service_default @@ -268,6 +279,8 @@ class murano( $data_dir = '/var/cache/murano', $notification_driver = 'messagingv2', $default_transport_url = $::os_service_default, + $rpc_response_timeout = $::os_service_default, + $control_exchange = $::os_service_default, $rabbit_os_use_ssl = $::os_service_default, $kombu_ssl_ca_certs = $::os_service_default, $kombu_ssl_certfile = $::os_service_default, @@ -435,7 +448,9 @@ deprecated. Please use murano::default_transport_url instead.") } oslo::messaging::default { 'murano_config': - transport_url => $default_transport_url, + transport_url => $default_transport_url, + rpc_response_timeout => $rpc_response_timeout, + control_exchange => $control_exchange, } oslo::messaging::notifications { 'murano_config': diff --git a/releasenotes/notes/add_messaging_default_parameters-9175a1238d4615f7.yaml b/releasenotes/notes/add_messaging_default_parameters-9175a1238d4615f7.yaml new file mode 100644 index 0000000..39d5e04 --- /dev/null +++ b/releasenotes/notes/add_messaging_default_parameters-9175a1238d4615f7.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/murano_init_spec.rb b/spec/classes/murano_init_spec.rb index 12bf0be..51a1db5 100644 --- a/spec/classes/murano_init_spec.rb +++ b/spec/classes/murano_init_spec.rb @@ -38,6 +38,8 @@ describe 'murano' do it { is_expected.to contain_murano_config('engine/use_trusts').with_value('') } it { is_expected.to contain_murano_config('DEFAULT/transport_url').with_value('') } + it { is_expected.to contain_murano_config('DEFAULT/rpc_response_timeout').with_value('') } + it { is_expected.to contain_murano_config('DEFAULT/control_exchange').with_value('') } it { is_expected.to contain_murano_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest') } it { is_expected.to contain_murano_config('oslo_messaging_rabbit/rabbit_password').with_value('guest') } it { is_expected.to contain_murano_config('oslo_messaging_rabbit/rabbit_hosts').with_value('') } @@ -78,6 +80,8 @@ describe 'murano' do :package_ensure => 'latest', :notification_driver => 'messagingv1', :default_transport_url => 'rabbit://user:pass@host:1234/virt', + :rpc_response_timeout => '120', + :control_exchange => 'murano', :rabbit_os_host => '10.255.0.1', :rabbit_os_port => '5673', :rabbit_os_user => 'os', @@ -131,6 +135,8 @@ describe 'murano' do it { is_expected.to contain_murano_config('engine/use_trusts').with_value(true) } it { is_expected.to contain_murano_config('DEFAULT/transport_url').with_value('rabbit://user:pass@host:1234/virt') } + it { is_expected.to contain_murano_config('DEFAULT/rpc_response_timeout').with_value('120') } + it { is_expected.to contain_murano_config('DEFAULT/control_exchange').with_value('murano') } it { is_expected.to contain_murano_config('oslo_messaging_rabbit/rabbit_userid').with_value('os') } it { is_expected.to contain_murano_config('oslo_messaging_rabbit/rabbit_password').with_value('ossecrete') } it { is_expected.to contain_murano_config('oslo_messaging_rabbit/rabbit_host').with_value('10.255.0.1') }