Merge "Configure the Ceilometer project name"
This commit is contained in:
commit
ba1c716cd8
@ -44,6 +44,10 @@
|
|||||||
# HTTPProxyToWSGI middleware.
|
# HTTPProxyToWSGI middleware.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# [*gnocchi_external_project_owner*]
|
||||||
|
# (optional) Gnocchi external project owner (usually Ceilometer project name)
|
||||||
|
# Defaults to 'services'
|
||||||
|
#
|
||||||
class aodh::api (
|
class aodh::api (
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
@ -54,6 +58,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,
|
||||||
|
$gnocchi_external_project_owner = 'services',
|
||||||
) inherits aodh::params {
|
) inherits aodh::params {
|
||||||
|
|
||||||
|
|
||||||
@ -109,8 +114,9 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||||||
}
|
}
|
||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'api/host': value => $host;
|
'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner;
|
||||||
'api/port': value => $port;
|
'api/host': value => $host;
|
||||||
|
'api/port': value => $port;
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::middleware { 'aodh_config':
|
oslo::middleware { 'aodh_config':
|
||||||
|
@ -36,6 +36,7 @@ describe 'aodh::api' do
|
|||||||
it 'configures api' do
|
it 'configures 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('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
|
||||||
|
|
||||||
@ -76,6 +77,13 @@ 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 gnocchi_external_project_owner' do
|
||||||
|
before do
|
||||||
|
params.merge!({:gnocchi_external_project_owner => 'gnocchi-project' })
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_aodh_config('api/gnocchi_external_project_owner').with_value('gnocchi-project') }
|
||||||
|
end
|
||||||
context 'with disabled service managing' do
|
context 'with disabled service managing' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
|
Loading…
Reference in New Issue
Block a user