Merge "Add transport_url parameter for oslo.messaging"

This commit is contained in:
Jenkins
2016-05-30 13:07:28 +00:00
committed by Gerrit Code Review
3 changed files with 29 additions and 2 deletions

View File

@@ -120,7 +120,13 @@
# [*control_exchange*]
# (optional) What RPC queue/exchange to use
# Defaults to neutron
#
# [*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) what rpc/queuing service to use
# Defaults to $::os_service_default
@@ -340,7 +346,9 @@
#
# [*notification_transport_url*]
# (optional) A URL representing the messaging driver to use for
# notifications.
# notifications and its full configuration. Transport URLs
# take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
@@ -385,6 +393,7 @@ class neutron (
$report_interval = $::os_service_default,
$memcache_servers = false,
$control_exchange = 'neutron',
$default_transport_url = $::os_service_default,
$rpc_backend = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$rabbit_password = $::os_service_default,
@@ -523,6 +532,7 @@ class neutron (
}
oslo::messaging::default { 'neutron_config':
transport_url => $default_transport_url,
rpc_response_timeout => $rpc_response_timeout,
control_exchange => $control_exchange
}

View File

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

View File

@@ -82,6 +82,7 @@ describe 'neutron' do
it_configures 'without memcache_servers'
it_configures 'with memcache_servers'
it_configures 'with dns_domain defined'
it_configures 'with transport_url defined'
context 'with amqp rpc_backend value' do
it_configures 'amqp support'
@@ -146,6 +147,7 @@ describe 'neutron' do
is_expected.to contain_neutron_config('DEFAULT/control_exchange').with_value('neutron')
is_expected.to contain_neutron_config('DEFAULT/state_path').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('oslo_concurrency/lock_path').with_value('$state_path/lock')
is_expected.to contain_neutron_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/rpc_response_timeout').with_value( '<SERVICE DEFAULT>' )
is_expected.to contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf')
is_expected.to contain_neutron_config('agent/report_interval').with_value('<SERVICE DEFAULT>')
@@ -450,6 +452,18 @@ describe 'neutron' do
end
end
shared_examples_for 'with transport_url defined' do
before do
params.merge!(
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673'
)
end
it do
is_expected.to contain_neutron_config('DEFAULT/transport_url').with_value(params[:default_transport_url])
end
end
shared_examples_for 'amqp support' do
context 'with default parameters' do
before { params.merge!( :rpc_backend => 'amqp' ) }