Configure the Ceilometer project name
This change configures the Ceilometer project name. This allow to use Aodh and Gnocchi alarms as non admin user. Change-Id: I8b8328a87997a3ba4e15bd711d266b564153a2d3
This commit is contained in:
parent
6d1d70ac8b
commit
03bd82ca15
@ -44,6 +44,10 @@
|
||||
# HTTPProxyToWSGI middleware.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*gnocchi_external_project_owner*]
|
||||
# (optional) Gnocchi external project owner (usually Ceilometer project name)
|
||||
# Defaults to 'services'
|
||||
#
|
||||
class aodh::api (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
@ -54,6 +58,7 @@ class aodh::api (
|
||||
$sync_db = false,
|
||||
$auth_strategy = 'keystone',
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
$gnocchi_external_project_owner = 'services',
|
||||
) inherits aodh::params {
|
||||
|
||||
|
||||
@ -109,8 +114,9 @@ as a standalone service, or httpd for being run by a httpd server")
|
||||
}
|
||||
|
||||
aodh_config {
|
||||
'api/host': value => $host;
|
||||
'api/port': value => $port;
|
||||
'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner;
|
||||
'api/host': value => $host;
|
||||
'api/port': value => $port;
|
||||
}
|
||||
|
||||
oslo::middleware { 'aodh_config':
|
||||
|
@ -36,6 +36,7 @@ describe 'aodh::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/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>')
|
||||
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) }
|
||||
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
|
||||
before do
|
||||
params.merge!({
|
||||
|
Loading…
Reference in New Issue
Block a user