Merge "Remove deprecated use_forwarded_for parameter"

This commit is contained in:
Zuul 2024-01-12 18:06:38 +00:00 committed by Gerrit Code Review
commit 885ed333e3
3 changed files with 4 additions and 14 deletions

View File

@ -141,11 +141,6 @@
# metadata handling from api class. # metadata handling from api class.
# Defaults to false # Defaults to false
# #
# [*use_forwarded_for*]
# (optional) Treat X-Forwarded-For as the canonical remote address. Only
# enable this if you have a sanitizing proxy.
# Defaults to undef
#
# [*hide_server_address_states*] # [*hide_server_address_states*]
# (optional) This option is a list of all instance states for which network address # (optional) This option is a list of all instance states for which network address
# information should not be returned from the API. # information should not be returned from the API.
@ -191,7 +186,6 @@ class nova::api(
$list_records_by_skipping_down_cells = $facts['os_service_default'], $list_records_by_skipping_down_cells = $facts['os_service_default'],
# DEPRECATED PARAMETER # DEPRECATED PARAMETER
$nova_metadata_wsgi_enabled = undef, $nova_metadata_wsgi_enabled = undef,
$use_forwarded_for = undef,
$hide_server_address_states = undef, $hide_server_address_states = undef,
$allow_instance_snapshots = undef, $allow_instance_snapshots = undef,
$enable_network_quota = undef, $enable_network_quota = undef,
@ -208,10 +202,6 @@ class nova::api(
warning('The nova_metadata_wsgi_enabled parameter has been deprecated and has no effect') warning('The nova_metadata_wsgi_enabled parameter has been deprecated and has no effect')
} }
if $use_forwarded_for != undef {
warning('The use_forwarded_for parameter has been deprecated.')
}
[ [
'hide_server_address_states', 'hide_server_address_states',
'allow_instance_snapshots', 'allow_instance_snapshots',
@ -300,7 +290,6 @@ as a standalone service, or httpd for being run by a httpd server")
nova_config { nova_config {
'wsgi/api_paste_config': value => $api_paste_config; 'wsgi/api_paste_config': value => $api_paste_config;
'DEFAULT/password_length': value => $password_length; 'DEFAULT/password_length': value => $password_length;
'api/use_forwarded_for': value => pick($use_forwarded_for, $facts['os_service_default']);
'api/max_limit': value => $max_limit; 'api/max_limit': value => $max_limit;
'api/compute_link_prefix': value => $compute_link_prefix; 'api/compute_link_prefix': value => $compute_link_prefix;
'api/glance_link_prefix': value => $glance_link_prefix; 'api/glance_link_prefix': value => $glance_link_prefix;

View File

@ -0,0 +1,4 @@
---
features:
- |
The ``nova::api::use_forwarded_for`` parameter has been removed.

View File

@ -48,7 +48,6 @@ 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('wsgi/api_paste_config').with_value('api-paste.ini')
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('api/use_forwarded_for').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('<SERVICE DEFAULT>') is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('5') is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('5')
@ -82,7 +81,6 @@ describe 'nova::api' do
:metadata_listen => '127.0.0.1', :metadata_listen => '127.0.0.1',
:metadata_listen_port => 8875, :metadata_listen_port => 8875,
:osapi_compute_listen_port => 8874, :osapi_compute_listen_port => 8874,
:use_forwarded_for => false,
:osapi_compute_workers => 1, :osapi_compute_workers => 1,
:metadata_workers => 2, :metadata_workers => 2,
:enable_proxy_headers_parsing => true, :enable_proxy_headers_parsing => true,
@ -120,7 +118,6 @@ describe 'nova::api' do
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('8874') is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('8874')
is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('127.0.0.1') is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('127.0.0.1')
is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('8875') is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('8875')
is_expected.to contain_nova_config('api/use_forwarded_for').with_value(false)
is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('1') is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('1')
is_expected.to contain_nova_config('DEFAULT/metadata_workers').with_value('2') is_expected.to contain_nova_config('DEFAULT/metadata_workers').with_value('2')
is_expected.to contain_nova_config('api/max_limit').with_value('1000') is_expected.to contain_nova_config('api/max_limit').with_value('1000')