Add support for [oslo_middleware] enable_proxy_headers_parsing
Depends-on: https://review.opendev.org/800611/ Change-Id: I1bd705f42bc06233b06421df5e058ab02a3d76b4
This commit is contained in:
parent
8a42cefcb3
commit
3c03d66e13
@ -27,6 +27,11 @@
|
||||
# (optional) Run placement-manage db sync on api nodes after installing the package.
|
||||
# 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
|
||||
#
|
||||
# [*host*]
|
||||
@ -38,14 +43,15 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class placement::api (
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$api_service_name = $::placement::params::service_name,
|
||||
$package_ensure = 'present',
|
||||
$sync_db = false,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$api_service_name = $::placement::params::service_name,
|
||||
$package_ensure = 'present',
|
||||
$sync_db = false,
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$host = undef,
|
||||
$port = undef,
|
||||
$host = undef,
|
||||
$port = undef,
|
||||
) inherits placement::params {
|
||||
|
||||
include placement::deps
|
||||
@ -85,4 +91,8 @@ class placement::api (
|
||||
if $sync_db {
|
||||
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,
|
||||
:ensure_package => 'present',
|
||||
) }
|
||||
|
||||
it { should contain_oslo__middleware('placement_config').with(
|
||||
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
||||
) }
|
||||
end
|
||||
|
||||
context 'with package_ensure parameter provided' do
|
||||
@ -46,6 +50,16 @@ describe 'placement::api' do
|
||||
|
||||
it { should contain_class('placement::db::sync') }
|
||||
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
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
x
Reference in New Issue
Block a user