Add parameter qpid_protocol to notify::qpid so ssl can be enabled.
Bug: #1251050 Change-Id: Ibc3b5e19b2543ff33366f305e7b9cef61dddf2f1
This commit is contained in:
@@ -5,13 +5,15 @@ class glance::notify::qpid(
|
||||
$qpid_password,
|
||||
$qpid_username = 'guest',
|
||||
$qpid_host = 'localhost',
|
||||
$qpid_port = '5672'
|
||||
$qpid_port = '5672',
|
||||
$qpid_protocol = 'tcp'
|
||||
) inherits glance::api {
|
||||
|
||||
glance_api_config {
|
||||
'DEFAULT/notifier_strategy': value => 'qpid';
|
||||
'DEFAULT/qpid_host': value => $qpid_host;
|
||||
'DEFAULT/qpid_port': value => $qpid_port;
|
||||
'DEFAULT/qpid_protocol': value => $qpid_protocol;
|
||||
'DEFAULT/qpid_username': value => $qpid_username;
|
||||
'DEFAULT/qpid_password': value => $qpid_password;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ describe 'glance::notify::qpid' do
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_password').with_value('pass') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_host').with_value('localhost') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_port').with_value('5672') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_protocol').with_value('tcp') }
|
||||
|
||||
describe 'when passing params' do
|
||||
let :params do
|
||||
@@ -30,6 +31,23 @@ describe 'glance::notify::qpid' do
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_username').with_value('guest2') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_host').with_value('localhost2') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_port').with_value('5673') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_protocol').with_value('tcp') }
|
||||
end
|
||||
end
|
||||
|
||||
describe 'configuring with ssl' do
|
||||
let :params do
|
||||
{
|
||||
:qpid_password => 'pass',
|
||||
:qpid_usernane => 'guest2',
|
||||
:qpid_host => 'localhost2',
|
||||
:qpid_port => '5671',
|
||||
:qpid_protocol => 'ssl'
|
||||
}
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_username').with_value('guest2') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_host').with_value('localhost2') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_port').with_value('5671') }
|
||||
it { should contain_glance_api_config('DEFAULT/qpid_protocol').with_value('ssl') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user