Add allow_tls_terminated_listeners config option
Adds the allow_tls_terminated_listeners config option to the octavia::api class, this sets the [api_settings]/allow_tls_terminated_listeners option in the octavia.conf file. Change-Id: I9da0f52addaab9c484ce5d5cfa9b233439a873e6
This commit is contained in:
parent
54c9e53a27
commit
14c52579f1
@ -30,19 +30,24 @@
|
||||
# (optional) The handler that the API communicates with
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*allow_tls_terminated_listeners*]
|
||||
# (optional) Boolean if we allow creation of TLS terminated listeners.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*sync_db*]
|
||||
# (optional) Run octavia-db-manage upgrade head on api nodes after installing the package.
|
||||
# Defaults to false
|
||||
#
|
||||
class octavia::api (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$host = '0.0.0.0',
|
||||
$port = '9876',
|
||||
$auth_strategy = 'keystone',
|
||||
$api_handler = $::os_service_default,
|
||||
$sync_db = false,
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$host = '0.0.0.0',
|
||||
$port = '9876',
|
||||
$auth_strategy = 'keystone',
|
||||
$api_handler = $::os_service_default,
|
||||
$allow_tls_terminated_listeners = $::os_service_default,
|
||||
$sync_db = false,
|
||||
) inherits octavia::params {
|
||||
|
||||
include ::octavia::deps
|
||||
@ -81,10 +86,11 @@ class octavia::api (
|
||||
}
|
||||
|
||||
octavia_config {
|
||||
'api_settings/bind_host' : value => $host;
|
||||
'api_settings/bind_port' : value => $port;
|
||||
'api_settings/auth_strategy' : value => $auth_strategy;
|
||||
'api_settings/api_handler' : value => $api_handler;
|
||||
'api_settings/bind_host': value => $host;
|
||||
'api_settings/bind_port': value => $port;
|
||||
'api_settings/auth_strategy': value => $auth_strategy;
|
||||
'api_settings/api_handler': value => $api_handler;
|
||||
'api_settings/allow_tls_terminated_listeners': value => $allow_tls_terminated_listeners;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added new parameter octavia::api::allow_tls_terminated_listeners which can
|
||||
be used to set the allow_tls_terminated_listeners config option.
|
@ -12,12 +12,13 @@ describe 'octavia::api' do
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :enabled => true,
|
||||
:manage_service => true,
|
||||
:package_ensure => 'latest',
|
||||
:port => '9876',
|
||||
:host => '0.0.0.0',
|
||||
:api_handler => 'queue_producer',
|
||||
{ :enabled => true,
|
||||
:manage_service => true,
|
||||
:package_ensure => 'latest',
|
||||
:port => '9876',
|
||||
:host => '0.0.0.0',
|
||||
:api_handler => 'queue_producer',
|
||||
:allow_tls_terminated_listeners => false,
|
||||
}
|
||||
end
|
||||
|
||||
@ -45,6 +46,7 @@ describe 'octavia::api' do
|
||||
is_expected.to contain_octavia_config('api_settings/bind_port').with_value( '9876' )
|
||||
is_expected.to contain_octavia_config('api_settings/auth_strategy').with_value( 'keystone' )
|
||||
is_expected.to contain_octavia_config('api_settings/api_handler').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_octavia_config('api_settings/allow_tls_terminated_listeners').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
it 'does not sync the database' do
|
||||
is_expected.not_to contain_class('octavia::db::sync')
|
||||
@ -55,6 +57,7 @@ describe 'octavia::api' do
|
||||
is_expected.to contain_octavia_config('api_settings/bind_host').with_value( params[:host] )
|
||||
is_expected.to contain_octavia_config('api_settings/bind_port').with_value( params[:port] )
|
||||
is_expected.to contain_octavia_config('api_settings/api_handler').with_value( params[:api_handler] )
|
||||
is_expected.to contain_octavia_config('api_settings/allow_tls_terminated_listeners').with_value( params[:allow_tls_terminated_listeners] )
|
||||
end
|
||||
|
||||
[{:enabled => true}, {:enabled => false}].each do |param_hash|
|
||||
|
Loading…
x
Reference in New Issue
Block a user