Allow guestagent to use unique rabbit_use_ssl param.

In some environments, Trove guests will talk to rabbit via
external VIP using SSL connection and trove services will
communicate to rabbit without ssl from the management network.

Change-Id: Ib5cd00cf92e4e2c23fbed2fd64420a07b0a46f88
Closes-Bug: #1585783
This commit is contained in:
Shaik Apsar 2016-05-25 16:34:29 -04:00
parent d6bb8e7152
commit 6c9f6eba03
2 changed files with 13 additions and 2 deletions

View File

@ -72,6 +72,13 @@
# guests need to talk to the rabbit cluster via
# a different port.
#
# [*rabbit_use_ssl*]
# (optional) Connect over SSL for RabbitMQ
# Defaults to the value set in the trove class.
# The default can generally be left unless the
# guests need to talk to the rabbit cluster via
# a different ssl connection option.
# DEPRECATED PARAMETERS
#
# [*verbose*]
@ -94,6 +101,7 @@ class trove::guestagent(
$rabbit_hosts = $::trove::rabbit_hosts,
$rabbit_host = $::trove::rabbit_host,
$rabbit_port = $::trove::rabbit_port,
$rabbit_use_ssl = $::trove::rabbit_use_ssl,
#Deprecated
$verbose = undef,
) inherits trove {
@ -133,11 +141,11 @@ class trove::guestagent(
rabbit_hosts => $rabbit_hosts,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_ha_queues => $::trove::rabbit_ha_queues,
rabbit_userid => $::trove::rabbit_userid,
rabbit_password => $::trove::rabbit_password,
rabbit_virtual_host => $::trove::rabbit_virtual_host,
rabbit_use_ssl => $::trove::rabbit_use_ssl,
kombu_reconnect_delay => $::trove::kombu_reconnect_delay,
amqp_durable_queues => $::trove::amqp_durable_queues,
kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs,

View File

@ -39,6 +39,7 @@ describe 'trove::guestagent' do
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_hosts').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_userid').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
@ -99,7 +100,8 @@ describe 'trove::guestagent' do
{ :auth_url => "http://10.0.0.1:5000/v2.0",
:swift_url => "http://10.0.0.1:8080/v1/AUTH_",
:rabbit_host => '10.1.0.1',
:rabbit_port => '5673'
:rabbit_port => '5673',
:rabbit_use_ssl => 'true'
}
end
it 'configures trove-guestagent with custom parameters' do
@ -107,6 +109,7 @@ describe 'trove::guestagent' do
is_expected.to contain_trove_guestagent_config('DEFAULT/swift_url').with_value('http://10.0.0.1:8080/v1/AUTH_')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_host').with_value('10.1.0.1')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('true')
end
end