allow to configure my_ip parameter

my_ip is useful to compute some parameter, for glance & neutron urls.

Change-Id: Ia283451647630b23bda19d3a14a17339ce258e17
This commit is contained in:
Emilien Macchi 2016-05-11 17:34:46 -04:00
parent ba159e362d
commit 05d474c3b2
2 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,12 @@
# (optional) Print debug messages in the logs # (optional) Print debug messages in the logs
# Defaults to False # Defaults to False
# #
# [*my_ip*]
# (optional) IP address of this host.
# If unset, will determine the IP programmatically. If unable to do so, will use
# "127.0.0.1".
# Defaults to $::os_service_default.
#
# [*auth_strategy*] # [*auth_strategy*]
# (optional) Default protocol to use when connecting to glance # (optional) Default protocol to use when connecting to glance
# Defaults to 'keystone'. 'https' is the only other valid option for SSL # Defaults to 'keystone'. 'https' is the only other valid option for SSL
@ -215,6 +221,7 @@ class ironic (
$package_ensure = 'present', $package_ensure = 'present',
$verbose = undef, $verbose = undef,
$debug = undef, $debug = undef,
$my_ip = $::os_service_default,
$use_syslog = undef, $use_syslog = undef,
$use_stderr = undef, $use_stderr = undef,
$log_facility = undef, $log_facility = undef,
@ -311,6 +318,7 @@ class ironic (
ironic_config { ironic_config {
'DEFAULT/auth_strategy': value => $auth_strategy; 'DEFAULT/auth_strategy': value => $auth_strategy;
'DEFAULT/enabled_drivers': value => join($enabled_drivers, ','); 'DEFAULT/enabled_drivers': value => join($enabled_drivers, ',');
'DEFAULT/my_ip': value => $my_ip;
'glance/glance_num_retries': value => $glance_num_retries; 'glance/glance_num_retries': value => $glance_num_retries;
'glance/glance_api_insecure': value => $glance_api_insecure; 'glance/glance_api_insecure': value => $glance_api_insecure;
} }

View File

@ -120,6 +120,7 @@ describe 'ironic' do
it 'configures ironic.conf' do it 'configures ironic.conf' do
is_expected.to contain_ironic_config('DEFAULT/auth_strategy').with_value('keystone') is_expected.to contain_ironic_config('DEFAULT/auth_strategy').with_value('keystone')
is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>') is_expected.to contain_ironic_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>') is_expected.to contain_ironic_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
end end