Merge "Add enable_proxy_headers_parsing option"

This commit is contained in:
Jenkins 2016-05-26 07:37:35 +00:00 committed by Gerrit Code Review
commit 0dd0534bc5
2 changed files with 38 additions and 27 deletions

View File

@ -150,6 +150,11 @@
# to make cinder-api be a web app using apache mod_wsgi.
# Defaults to '$::cinder::params::api_service'
#
# [*enable_proxy_headers_parsing*]
# (optional) This determines if the HTTPProxyToWSGI
# middleware should parse the proxy headers or not.(boolean value)
# Defaults to $::os_service_default
#
class cinder::api (
$keystone_password,
$keystone_enabled = true,
@ -181,6 +186,7 @@ class cinder::api (
$osapi_volume_base_url = $::os_service_default,
$osapi_max_limit = $::os_service_default,
$service_name = $::cinder::params::api_service,
$enable_proxy_headers_parsing = $::os_service_default,
# DEPRECATED PARAMETERS
$validation_options = {},
) inherits cinder::params {
@ -260,6 +266,10 @@ class cinder::api (
'DEFAULT/nova_catalog_admin_info': value => $nova_catalog_admin_info;
}
oslo::middleware {'cinder_config':
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
}
if $privileged_user {
if is_service_default($os_privileged_user_name) {
fail('The os_privileged_user_name parameter is required when privileged_user is set to true')

View File

@ -70,6 +70,7 @@ describe 'cinder::api' do
is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_tenant').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_auth_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('keymgr/encryption_auth_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('oslo_middleware/enable_proxy_headers_parsing').with('value' => '<SERVICE DEFAULT>')
end
end