Add support for api/gnocchi_external_domain_name
Change-Id: Ifece49e145c57b9b04312536ac771a55d791e4ab
This commit is contained in:
@@ -48,6 +48,10 @@
|
|||||||
# (optional) Gnocchi external project owner (usually Ceilometer project name)
|
# (optional) Gnocchi external project owner (usually Ceilometer project name)
|
||||||
# Defaults to 'services'
|
# Defaults to 'services'
|
||||||
#
|
#
|
||||||
|
# [*gnocchi_external_domain_name*]
|
||||||
|
# (optional) Domain name of resources creator in Gnocchi.
|
||||||
|
# Defaults to 'Default'
|
||||||
|
#
|
||||||
class aodh::api (
|
class aodh::api (
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
@@ -59,6 +63,7 @@ class aodh::api (
|
|||||||
$max_request_body_size = $::os_service_default,
|
$max_request_body_size = $::os_service_default,
|
||||||
$paste_config = $::os_service_default,
|
$paste_config = $::os_service_default,
|
||||||
$gnocchi_external_project_owner = 'services',
|
$gnocchi_external_project_owner = 'services',
|
||||||
|
$gnocchi_external_domain_name = 'Default',
|
||||||
) inherits aodh::params {
|
) inherits aodh::params {
|
||||||
|
|
||||||
|
|
||||||
@@ -116,6 +121,7 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner;
|
'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner;
|
||||||
|
'api/gnocchi_external_domain_name': value => $gnocchi_external_domain_name;
|
||||||
'api/paste_config': value => $paste_config;
|
'api/paste_config': value => $paste_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``aodh::api::gnocchi_external_domain_name`` parameter has been
|
||||||
|
added.
|
@@ -32,7 +32,8 @@ describe 'aodh::api' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'configures api' do
|
it 'configures api' do
|
||||||
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/gnocchi_external_domain_name').with_value('Default')
|
||||||
is_expected.to contain_aodh_config('api/paste_config').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_aodh_config('api/paste_config').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_oslo__middleware('aodh_config').with(
|
is_expected.to contain_oslo__middleware('aodh_config').with(
|
||||||
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
||||||
@@ -97,12 +98,18 @@ describe 'aodh::api' do
|
|||||||
it { is_expected.to contain_aodh_config('api/paste_config').with_value('/etc/aodh/api-paste.ini') }
|
it { is_expected.to contain_aodh_config('api/paste_config').with_value('/etc/aodh/api-paste.ini') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with gnocchi_external_project_owner' do
|
context 'with gnocchi parameters' do
|
||||||
before do
|
before do
|
||||||
params.merge!({:gnocchi_external_project_owner => 'gnocchi-project' })
|
params.merge!({
|
||||||
|
:gnocchi_external_project_owner => 'gnocchi-project',
|
||||||
|
:gnocchi_external_domain_name => 'MyDomain'
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_aodh_config('api/gnocchi_external_project_owner').with_value('gnocchi-project') }
|
it 'configures gnocchi parameters' do
|
||||||
|
is_expected.to contain_aodh_config('api/gnocchi_external_project_owner').with_value('gnocchi-project')
|
||||||
|
is_expected.to contain_aodh_config('api/gnocchi_external_domain_name').with_value('MyDomain')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
context 'with disabled service managing' do
|
context 'with disabled service managing' do
|
||||||
before do
|
before do
|
||||||
|
Reference in New Issue
Block a user