Add transport_url parameters for oslo.messaging
This commit adds the transport_url parameters for oslo.messaging. The url is of the form: transport://user:pass@host1:port[,hostN:portN]/virtual_host Where the transport scheme specifies the rpc or notification backend as one of rabbit, amqp, zmq, etc. Oslo.messaging is deprecating the host, port, and auth configuration options [1]. All drivers will get these options via the transport_url. This patch: * use oslo::messaging::default resource * use oslo::messaging::notifications resource * add parameters for transport_url(s) * update spec tests * add feature release note [1] https://review.openstack.org/#/c/317285/ Change-Id: I42ac4ecb3ce9935dc5403c3b1962ee6a6ff8625b
This commit is contained in:
parent
90477ae87d
commit
85d069bbf7
@ -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,
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add oslo.messaging transport_url parameters via puppet-oslo resource
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user