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:
@@ -12,6 +12,10 @@
|
|||||||
# (required) Transport URL for notifier service to talk to
|
# (required) Transport URL for notifier service to talk to
|
||||||
# the messaging queue.
|
# the messaging queue.
|
||||||
#
|
#
|
||||||
|
# [*bind_address*]
|
||||||
|
# (optional) IP address for novajoin server to listen
|
||||||
|
# Defaults to '127.0.0.1'
|
||||||
|
#
|
||||||
# [*api_paste_config*]
|
# [*api_paste_config*]
|
||||||
# (optional) Filename for the paste deploy file.
|
# (optional) Filename for the paste deploy file.
|
||||||
# Defaults to '/etc/nova/join-api-paste.ini'.
|
# Defaults to '/etc/nova/join-api-paste.ini'.
|
||||||
@@ -91,6 +95,7 @@
|
|||||||
class nova::metadata::novajoin::api (
|
class nova::metadata::novajoin::api (
|
||||||
$nova_password,
|
$nova_password,
|
||||||
$transport_url,
|
$transport_url,
|
||||||
|
$bind_address = '127.0.0.1',
|
||||||
$api_paste_config = '/etc/nova/join-api-paste.ini',
|
$api_paste_config = '/etc/nova/join-api-paste.ini',
|
||||||
$auth_strategy = $::os_service_default,
|
$auth_strategy = $::os_service_default,
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
@@ -140,6 +145,7 @@ class nova::metadata::novajoin::api (
|
|||||||
}
|
}
|
||||||
|
|
||||||
novajoin_config {
|
novajoin_config {
|
||||||
|
'DEFAULT/join_listen': value => $bind_address;
|
||||||
'DEFAULT/api_paste_config': value => $api_paste_config;
|
'DEFAULT/api_paste_config': value => $api_paste_config;
|
||||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||||
'DEFAULT/cacert': value => $cacert;
|
'DEFAULT/cacert': value => $cacert;
|
||||||
|
@@ -15,6 +15,7 @@ describe 'nova::metadata::novajoin::api' do
|
|||||||
|
|
||||||
let :default_params do
|
let :default_params do
|
||||||
{
|
{
|
||||||
|
:bind_address => '127.0.0.1',
|
||||||
:api_paste_config => '/etc/nova/join-api-paste.ini',
|
:api_paste_config => '/etc/nova/join-api-paste.ini',
|
||||||
:auth_strategy => '<SERVICE DEFAULT>',
|
:auth_strategy => '<SERVICE DEFAULT>',
|
||||||
:auth_type => 'password',
|
: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',
|
:api_paste_config => '/etc/nova/join-api-paste.ini',
|
||||||
:auth_strategy => 'noauth2',
|
:auth_strategy => 'noauth2',
|
||||||
:auth_type => 'password',
|
:auth_type => 'password',
|
||||||
@@ -96,6 +98,7 @@ describe 'nova::metadata::novajoin::api' do
|
|||||||
) }
|
) }
|
||||||
|
|
||||||
it 'is_expected.to configure default parameters' 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/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/auth_strategy').with_value(param_hash[:auth_strategy])
|
||||||
is_expected.to contain_novajoin_config('DEFAULT/cacert').with_value(param_hash[:cacert])
|
is_expected.to contain_novajoin_config('DEFAULT/cacert').with_value(param_hash[:cacert])
|
||||||
|
Reference in New Issue
Block a user