Replace deprecated [oslo_middleware] enable_proxy_headers_parsing

Gnocchi replaced usage of http_proxy_to_wsgi middleware from
the oslo.middleware library by its own implementation since Gnocchi
4.4[1]. Because now both Ubuntu and CentOS uses Gnocchi 4.4.z, this
replaces the deprecated [oslo_middleware] parameter by the new [api]
parameter.

[1] bcd9a8cdd7

Change-Id: I52ba953c481bb66dd8a5af35b74c11dac6278e45
This commit is contained in:
Takashi Kajinami 2022-09-06 17:17:03 +09:00
parent b607c46cef
commit 86fc061b4c
2 changed files with 9 additions and 11 deletions

View File

@ -116,15 +116,15 @@ standalone service, or httpd for being run by a httpd server")
}
gnocchi_config {
'api/max_limit': value => $max_limit;
'api/auth_mode': value => $auth_strategy;
'api/paste_config': value => $paste_config;
'api/operation_timeout': value => $operation_timeout;
'api/max_limit': value => $max_limit;
'api/auth_mode': value => $auth_strategy;
'api/paste_config': value => $paste_config;
'api/operation_timeout': value => $operation_timeout;
'api/enable_proxy_headers_parsing': value => $enable_proxy_headers_parsing;
}
oslo::middleware { 'gnocchi_config':
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
max_request_body_size => $max_request_body_size,
max_request_body_size => $max_request_body_size,
}
if $auth_strategy == 'keystone' {

View File

@ -61,9 +61,9 @@ describe 'gnocchi::api' do
is_expected.to contain_gnocchi_config('api/auth_mode').with_value('keystone')
is_expected.to contain_gnocchi_config('api/paste_config').with_value('<SERVICE DEFAULT>')
is_expected.to contain_gnocchi_config('api/operation_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_gnocchi_config('api/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__middleware('gnocchi_config').with(
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
:max_request_body_size => '<SERVICE DEFAULT>',
:max_request_body_size => '<SERVICE DEFAULT>',
)
end
@ -178,9 +178,7 @@ describe 'gnocchi::api' do
params.merge!({:enable_proxy_headers_parsing => true })
end
it { is_expected.to contain_oslo__middleware('gnocchi_config').with(
:enable_proxy_headers_parsing => true,
)}
it { is_expected.to contain_gnocchi_config('api/enable_proxy_headers_parsing').with_value(true) }
end
context 'with max_request_body_size' do