diff --git a/manifests/api.pp b/manifests/api.pp index f31a75e9f..00917f7a9 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -39,7 +39,7 @@ # [*use_forwarded_for*] # (optional) Treat X-Forwarded-For as the canonical remote address. Only # enable this if you have a sanitizing proxy. -# Defaults to false +# Defaults to $::os_service_default # # [*osapi_compute_workers*] # (optional) Number of workers for OpenStack API service @@ -200,7 +200,7 @@ class nova::api( $metadata_listen = $::os_service_default, $metadata_listen_port = $::os_service_default, $enabled_apis = ['osapi_compute', 'metadata'], - $use_forwarded_for = false, + $use_forwarded_for = $::os_service_default, $osapi_compute_workers = $::os_workers, $metadata_workers = $::os_workers, $sync_db = true, diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 2ddbeadfe..43ef1e197 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -49,6 +49,7 @@ describe 'nova::api' do is_expected.to contain_nova_config('wsgi/api_paste_config').with_value('api-paste.ini') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with_value('') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('') + is_expected.to contain_nova_config('api/use_forwarded_for').with_value('') is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('') is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('') is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('5')