Merge "Add support for [oslo_middleware] enable_proxy_headers_parsing"
This commit is contained in:
@@ -27,6 +27,11 @@
|
|||||||
# (optional) Run placement-manage db sync on api nodes after installing the package.
|
# (optional) Run placement-manage db sync on api nodes after installing the package.
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
#
|
#
|
||||||
|
# [*enable_proxy_headers_parsing*]
|
||||||
|
# (Optional) Enable paste middleware to handle SSL requests through
|
||||||
|
# HTTPProxyToWSGI middleware.
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*host*]
|
# [*host*]
|
||||||
@@ -38,14 +43,15 @@
|
|||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
class placement::api (
|
class placement::api (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$api_service_name = $::placement::params::service_name,
|
$api_service_name = $::placement::params::service_name,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$sync_db = false,
|
$sync_db = false,
|
||||||
|
$enable_proxy_headers_parsing = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$host = undef,
|
$host = undef,
|
||||||
$port = undef,
|
$port = undef,
|
||||||
) inherits placement::params {
|
) inherits placement::params {
|
||||||
|
|
||||||
include placement::deps
|
include placement::deps
|
||||||
@@ -85,4 +91,8 @@ class placement::api (
|
|||||||
if $sync_db {
|
if $sync_db {
|
||||||
include placement::db::sync
|
include placement::db::sync
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oslo::middleware { 'placement_config':
|
||||||
|
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``placement::api::enable_proxy_headers_parsing`` parameter has been
|
||||||
|
added.
|
@@ -17,6 +17,10 @@ describe 'placement::api' do
|
|||||||
:enabled => true,
|
:enabled => true,
|
||||||
:ensure_package => 'present',
|
:ensure_package => 'present',
|
||||||
) }
|
) }
|
||||||
|
|
||||||
|
it { should contain_oslo__middleware('placement_config').with(
|
||||||
|
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
||||||
|
) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with package_ensure parameter provided' do
|
context 'with package_ensure parameter provided' do
|
||||||
@@ -46,6 +50,16 @@ describe 'placement::api' do
|
|||||||
|
|
||||||
it { should contain_class('placement::db::sync') }
|
it { should contain_class('placement::db::sync') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with enable_proxy_headers_parsing set' do
|
||||||
|
let :params do
|
||||||
|
{ :enable_proxy_headers_parsing => true }
|
||||||
|
end
|
||||||
|
|
||||||
|
it { should contain_oslo__middleware('placement_config').with(
|
||||||
|
:enable_proxy_headers_parsing => true,
|
||||||
|
) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
|
Reference in New Issue
Block a user