diff --git a/manifests/init.pp b/manifests/init.pp index de7b08951..b3429b69b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -403,6 +403,12 @@ # per compute node. # Defaults to $::os_service_default # +# [*my_ip*] +# (optional) IP address of this host on the management network. +# If unset, will determine the IP programmatically based on the default route. +# If unable to do so, will use "127.0.0.1". +# Defaults to $::os_service_default. +# # DEPRECATED PARAMETERS # # [*rabbit_host*] @@ -526,6 +532,7 @@ class nova( $ram_allocation_ratio = $::os_service_default, $disk_allocation_ratio = $::os_service_default, $purge_config = false, + $my_ip = $::os_service_default, # DEPRECATED PARAMETERS $rabbit_host = $::os_service_default, $rabbit_hosts = $::os_service_default, @@ -650,6 +657,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") } nova_config { + 'DEFAULT/my_ip': value => $my_ip; 'api/auth_strategy': value => $auth_strategy; 'DEFAULT/image_service': value => $image_service; 'DEFAULT/host': value => $host; diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index ed9ff5ac9..b9401a237 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -114,6 +114,7 @@ describe 'nova' do :purge_config => false, :block_device_allocate_retries => '60', :block_device_allocate_retries_interval => '3', + :my_ip => '192.0.2.1', } end @@ -155,6 +156,10 @@ describe 'nova' do is_expected.to contain_nova_config('DEFAULT/host').with_value('test-001.example.org') end + it 'configures my_ip' do + is_expected.to contain_nova_config('DEFAULT/my_ip').with_value('192.0.2.1') + end + it 'configures upgrade_levels' do is_expected.to contain_nova_config('upgrade_levels/cells').with_value('1.0.0') is_expected.to contain_nova_config('upgrade_levels/cert').with_value('1.0.0')