Make novajoin bind address configurable
They used to be hardcoded to only use the defaults that come with the service's configuration. This should make them configurable. Change-Id: If8e240f175f4ce67469bf26ae10c53df5bd16359
This commit is contained in:
parent
eeb1ac94ab
commit
07e878479f
|
@ -12,6 +12,10 @@
|
|||
# (required) Transport URL for notifier service to talk to
|
||||
# the messaging queue.
|
||||
#
|
||||
# [*bind_address*]
|
||||
# (optional) IP address for novajoin server to listen
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*api_paste_config*]
|
||||
# (optional) Filename for the paste deploy file.
|
||||
# Defaults to '/etc/nova/join-api-paste.ini'.
|
||||
|
@ -91,6 +95,7 @@
|
|||
class nova::metadata::novajoin::api (
|
||||
$nova_password,
|
||||
$transport_url,
|
||||
$bind_address = '127.0.0.1',
|
||||
$api_paste_config = '/etc/nova/join-api-paste.ini',
|
||||
$auth_strategy = $::os_service_default,
|
||||
$auth_type = 'password',
|
||||
|
@ -140,6 +145,7 @@ class nova::metadata::novajoin::api (
|
|||
}
|
||||
|
||||
novajoin_config {
|
||||
'DEFAULT/join_listen': value => $bind_address;
|
||||
'DEFAULT/api_paste_config': value => $api_paste_config;
|
||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||
'DEFAULT/cacert': value => $cacert;
|
||||
|
|
|
@ -15,6 +15,7 @@ describe 'nova::metadata::novajoin::api' do
|
|||
|
||||
let :default_params do
|
||||
{
|
||||
:bind_address => '127.0.0.1',
|
||||
:api_paste_config => '/etc/nova/join-api-paste.ini',
|
||||
:auth_strategy => '<SERVICE DEFAULT>',
|
||||
:auth_type => 'password',
|
||||
|
@ -41,6 +42,7 @@ describe 'nova::metadata::novajoin::api' do
|
|||
|
||||
[{},
|
||||
{
|
||||
:bind_address => '0.0.0.0',
|
||||
:api_paste_config => '/etc/nova/join-api-paste.ini',
|
||||
:auth_strategy => 'noauth2',
|
||||
:auth_type => 'password',
|
||||
|
@ -96,6 +98,7 @@ describe 'nova::metadata::novajoin::api' do
|
|||
) }
|
||||
|
||||
it 'is_expected.to configure default parameters' do
|
||||
is_expected.to contain_novajoin_config('DEFAULT/join_listen').with_value(param_hash[:bind_address])
|
||||
is_expected.to contain_novajoin_config('DEFAULT/api_paste_config').with_value(param_hash[:api_paste_config])
|
||||
is_expected.to contain_novajoin_config('DEFAULT/auth_strategy').with_value(param_hash[:auth_strategy])
|
||||
is_expected.to contain_novajoin_config('DEFAULT/cacert').with_value(param_hash[:cacert])
|
||||
|
|
Loading…
Reference in New Issue