Add support for [api] paste_config
Change-Id: Ide71a2bd652db2c9e7c04d0679f507afb3de0a16
This commit is contained in:
parent
34d63f505a
commit
20efa3dc75
|
@ -37,6 +37,10 @@
|
|||
# Can be set to noauth and keystone.
|
||||
# Defaults to 'keystone'.
|
||||
#
|
||||
# [*paste_config*]
|
||||
# (Optional) Path to API paste configuration.
|
||||
# Defaults to $:;os_service_default
|
||||
#
|
||||
# [*enable_proxy_headers_parsing*]
|
||||
# (Optional) Enable paste middleware to handle SSL requests through
|
||||
# HTTPProxyToWSGI middleware.
|
||||
|
@ -60,6 +64,7 @@ class gnocchi::api (
|
|||
$service_name = $::gnocchi::params::api_service_name,
|
||||
$sync_db = false,
|
||||
$auth_strategy = 'keystone',
|
||||
$paste_config = $::os_service_default,
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
$max_request_body_size = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
|
@ -124,6 +129,7 @@ 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;
|
||||
}
|
||||
|
||||
oslo::middleware { 'gnocchi_config':
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The new ``gnocchi::api::paste_config`` parameter has been added.
|
|
@ -60,6 +60,7 @@ describe 'gnocchi::api' do
|
|||
it 'configures gnocchi-api' do
|
||||
is_expected.to contain_gnocchi_config('api/max_limit').with_value( params[:max_limit] )
|
||||
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_oslo__middleware('gnocchi_config').with(
|
||||
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
||||
:max_request_body_size => '<SERVICE DEFAULT>',
|
||||
|
@ -155,6 +156,14 @@ describe 'gnocchi::api' do
|
|||
it_raises 'a Puppet::Error', /Invalid service_name/
|
||||
end
|
||||
|
||||
context 'with paste_config' do
|
||||
before do
|
||||
params.merge!({:paste_config => 'api-paste.ini' })
|
||||
end
|
||||
|
||||
it { is_expected.to contain_gnocchi_config('api/paste_config').with_value('api-paste.ini') }
|
||||
end
|
||||
|
||||
context 'with enable_proxy_headers_parsing' do
|
||||
before do
|
||||
params.merge!({:enable_proxy_headers_parsing => true })
|
||||
|
|
Loading…
Reference in New Issue