Support setting paste_config setting on api.
Change-Id: I65ce3da1c8af997e0a659e0e65daab6ef645b8fa
This commit is contained in:
parent
f6ef8011f8
commit
6a0225617f
@ -44,6 +44,10 @@
|
|||||||
# HTTPProxyToWSGI middleware.
|
# HTTPProxyToWSGI middleware.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# [*paste_config*]
|
||||||
|
# (Optional) Configuration file for WSGI definition of API
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# [*gnocchi_external_project_owner*]
|
# [*gnocchi_external_project_owner*]
|
||||||
# (optional) Gnocchi external project owner (usually Ceilometer project name)
|
# (optional) Gnocchi external project owner (usually Ceilometer project name)
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
@ -58,6 +62,7 @@ class aodh::api (
|
|||||||
$sync_db = false,
|
$sync_db = false,
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$enable_proxy_headers_parsing = $::os_service_default,
|
$enable_proxy_headers_parsing = $::os_service_default,
|
||||||
|
$paste_config = $::os_service_default,
|
||||||
$gnocchi_external_project_owner = 'services',
|
$gnocchi_external_project_owner = 'services',
|
||||||
) inherits aodh::params {
|
) inherits aodh::params {
|
||||||
|
|
||||||
@ -117,6 +122,7 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||||||
'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner;
|
'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner;
|
||||||
'api/host': value => $host;
|
'api/host': value => $host;
|
||||||
'api/port': value => $port;
|
'api/port': value => $port;
|
||||||
|
'api/paste_config': value => $paste_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::middleware { 'aodh_config':
|
oslo::middleware { 'aodh_config':
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Added ability to set paste_config option which is used by aodh-api
|
@ -37,6 +37,7 @@ describe 'aodh::api' do
|
|||||||
is_expected.to contain_aodh_config('api/host').with_value( params[:host] )
|
is_expected.to contain_aodh_config('api/host').with_value( params[:host] )
|
||||||
is_expected.to contain_aodh_config('api/port').with_value( params[:port] )
|
is_expected.to contain_aodh_config('api/port').with_value( params[:port] )
|
||||||
is_expected.to contain_aodh_config('api/gnocchi_external_project_owner').with_value( 'services' )
|
is_expected.to contain_aodh_config('api/gnocchi_external_project_owner').with_value( 'services' )
|
||||||
|
is_expected.to contain_aodh_config('api/paste_config').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_aodh_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_aodh_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -77,6 +78,14 @@ describe 'aodh::api' do
|
|||||||
it { is_expected.to contain_aodh_config('oslo_middleware/enable_proxy_headers_parsing').with_value(true) }
|
it { is_expected.to contain_aodh_config('oslo_middleware/enable_proxy_headers_parsing').with_value(true) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with paste_config' do
|
||||||
|
before do
|
||||||
|
params.merge!({:paste_config => '/etc/aodh/api-paste.ini' })
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_aodh_config('api/paste_config').with_value('/etc/aodh/api-paste.ini') }
|
||||||
|
end
|
||||||
|
|
||||||
context 'with gnocchi_external_project_owner' do
|
context 'with gnocchi_external_project_owner' do
|
||||||
before do
|
before do
|
||||||
params.merge!({:gnocchi_external_project_owner => 'gnocchi-project' })
|
params.merge!({:gnocchi_external_project_owner => 'gnocchi-project' })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user