api: move SSL parameters under [ssl] section
Move SSL parameters under [ssl] section, like it should be done when using Oslo Service. Change-Id: I5ae991970f949dd9cfe2948b829ba5bb9834423c
This commit is contained in:
parent
683c303f94
commit
80cf1085e2
@ -283,29 +283,29 @@ class trove::api(
|
||||
# SSL Options
|
||||
if $cert_file {
|
||||
trove_config {
|
||||
'DEFAULT/cert_file' : value => $cert_file;
|
||||
'ssl/cert_file' : value => $cert_file;
|
||||
}
|
||||
} else {
|
||||
trove_config {
|
||||
'DEFAULT/cert_file': ensure => absent;
|
||||
'ssl/cert_file': ensure => absent;
|
||||
}
|
||||
}
|
||||
if $key_file {
|
||||
trove_config {
|
||||
'DEFAULT/key_file' : value => $key_file;
|
||||
'ssl/key_file' : value => $key_file;
|
||||
}
|
||||
} else {
|
||||
trove_config {
|
||||
'DEFAULT/key_file': ensure => absent;
|
||||
'ssl/key_file': ensure => absent;
|
||||
}
|
||||
}
|
||||
if $ca_file {
|
||||
trove_config {
|
||||
'DEFAULT/ca_file' : value => $ca_file;
|
||||
'ssl/ca_file' : value => $ca_file;
|
||||
}
|
||||
} else {
|
||||
trove_config {
|
||||
'DEFAULT/ca_file': ensure => absent;
|
||||
'ssl/ca_file': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,9 @@ describe 'trove::api' do
|
||||
is_expected.to contain_trove_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
|
||||
is_expected.to contain_trove_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(false)
|
||||
is_expected.to contain_trove_config('ssl/cert_file').with_ensure('absent')
|
||||
is_expected.to contain_trove_config('ssl/key_file').with_ensure('absent')
|
||||
is_expected.to contain_trove_config('ssl/ca_file').with_ensure('absent')
|
||||
end
|
||||
|
||||
context 'with deprecated parameters' do
|
||||
@ -114,6 +117,22 @@ describe 'trove::api' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with SSL enabled on API' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:cert_file => 'cert',
|
||||
:key_file => 'key',
|
||||
:ca_file => 'ca',
|
||||
)
|
||||
end
|
||||
|
||||
it 'contains ssl parameters' do
|
||||
is_expected.to contain_trove_config('ssl/cert_file').with_value('cert')
|
||||
is_expected.to contain_trove_config('ssl/key_file').with_value('key')
|
||||
is_expected.to contain_trove_config('ssl/ca_file').with_value('ca')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with overridden rate limit parameters' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
|
Loading…
Reference in New Issue
Block a user