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] https://github.com/gnocchixyz/gnocchi/commit/bcd9a8cdd7c37fb655764a3b12c7e567598d088d
Change-Id: I52ba953c481bb66dd8a5af35b74c11dac6278e45
Takashi Kajinami
1 year, 8 months ago
115 | 115 |
}
|
116 | 116 |
|
117 | 117 |
gnocchi_config {
|
118 | |
'api/max_limit': value => $max_limit;
|
119 | |
'api/auth_mode': value => $auth_strategy;
|
120 | |
'api/paste_config': value => $paste_config;
|
121 | |
'api/operation_timeout': value => $operation_timeout;
|
|
118 |
'api/max_limit': value => $max_limit;
|
|
119 |
'api/auth_mode': value => $auth_strategy;
|
|
120 |
'api/paste_config': value => $paste_config;
|
|
121 |
'api/operation_timeout': value => $operation_timeout;
|
|
122 |
'api/enable_proxy_headers_parsing': value => $enable_proxy_headers_parsing;
|
122 | 123 |
}
|
123 | 124 |
|
124 | 125 |
oslo::middleware { 'gnocchi_config':
|
125 | |
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
|
126 | |
max_request_body_size => $max_request_body_size,
|
|
126 |
max_request_body_size => $max_request_body_size,
|
127 | 127 |
}
|
128 | 128 |
|
129 | 129 |
if $auth_strategy == 'keystone' {
|
60 | 60 |
is_expected.to contain_gnocchi_config('api/auth_mode').with_value('keystone')
|
61 | 61 |
is_expected.to contain_gnocchi_config('api/paste_config').with_value('<SERVICE DEFAULT>')
|
62 | 62 |
is_expected.to contain_gnocchi_config('api/operation_timeout').with_value('<SERVICE DEFAULT>')
|
|
63 |
is_expected.to contain_gnocchi_config('api/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
|
63 | 64 |
is_expected.to contain_oslo__middleware('gnocchi_config').with(
|
64 | |
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
65 | |
:max_request_body_size => '<SERVICE DEFAULT>',
|
|
65 |
:max_request_body_size => '<SERVICE DEFAULT>',
|
66 | 66 |
)
|
67 | 67 |
end
|
68 | 68 |
|
|
177 | 177 |
params.merge!({:enable_proxy_headers_parsing => true })
|
178 | 178 |
end
|
179 | 179 |
|
180 | |
it { is_expected.to contain_oslo__middleware('gnocchi_config').with(
|
181 | |
:enable_proxy_headers_parsing => true,
|
182 | |
)}
|
|
180 |
it { is_expected.to contain_gnocchi_config('api/enable_proxy_headers_parsing').with_value(true) }
|
183 | 181 |
end
|
184 | 182 |
|
185 | 183 |
context 'with max_request_body_size' do
|