Merge "Add transport_url parameters for oslo.messaging"

This commit is contained in:
Jenkins 2016-05-31 06:00:18 +00:00 committed by Gerrit Code Review
commit 14d456d875
3 changed files with 24 additions and 2 deletions

View File

@ -17,6 +17,12 @@
# If set to boolean 'false', it will not log to any directory
# Defaults to undef.
#
# [*default_transport_url*]
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default
#
# [*rpc_backend*]
# (Optional) Use these options to configure the message system.
# Defaults to $::os_service_default.
@ -185,6 +191,12 @@
# Should be larger than max_template_size.
# 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
#
# [*notification_driver*]
# (Optional) Driver or drivers to handle sending notifications.
# Value can be a string or a list.
@ -324,6 +336,7 @@ class heat(
$keystone_project_domain_name = 'Default',
$keystone_user_domain_id = 'Default',
$keystone_user_domain_name = 'Default',
$default_transport_url = $::os_service_default,
$rpc_backend = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$rabbit_host = $::os_service_default,
@ -377,6 +390,7 @@ class heat(
$sync_db = undef,
$max_template_size = $::os_service_default,
$max_json_body_size = $::os_service_default,
$notification_transport_url = $::os_service_default,
$notification_driver = $::os_service_default,
$enable_proxy_headers_parsing = $::os_service_default,
$heat_clients_url = $::os_service_default,
@ -502,10 +516,12 @@ class heat(
}
oslo::messaging::notifications { 'heat_config':
driver => $notification_driver,
transport_url => $notification_transport_url,
driver => $notification_driver,
}
oslo::messaging::default { 'heat_config':
transport_url => $default_transport_url,
rpc_response_timeout => $rpc_response_timeout,
}

View File

@ -0,0 +1,3 @@
---
features:
- Add oslo.messaging transport_url parameters via puppet-oslo resource

View File

@ -126,6 +126,7 @@ describe 'heat' do
it { is_expected.to contain_heat_config('paste_deploy/flavor').with_value('keystone') }
it 'configures notification_driver' do
is_expected.to contain_heat_config('oslo_messaging_notifications/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_heat_config('oslo_messaging_notifications/driver').with_value('<SERVICE DEFAULT>')
end
@ -437,11 +438,13 @@ describe 'heat' do
shared_examples_for 'with notification_driver set to a string' do
before do
params.merge!(
:notification_driver => 'bar.foo.rpc_notifier',
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'bar.foo.rpc_notifier',
)
end
it 'has notification_driver set when specified' do
is_expected.to contain_heat_config('oslo_messaging_notifications/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_heat_config('oslo_messaging_notifications/driver').with_value('bar.foo.rpc_notifier')
end
end