deprecate ceilometer::dispatcher::gnocchi::url

The url option of ceilometer::dispatcher::gnocchi doesn't exists anymore
since a while in Ceilometer.

So this change deprecate it for removal.

Change-Id: I2b87de910b73d65111d609b8722183c1852f9c35
This commit is contained in:
Mehdi Abaakouk 2017-03-22 14:46:36 +01:00 committed by Pradeep Kilambi
parent e664330298
commit 1ef6b0b7f6
3 changed files with 17 additions and 9 deletions

View File

@ -13,10 +13,6 @@
# generated by Gnocchi service activity
# Defaults to $::os_service_default.
#
# [*url*]
# (Optional) Gnocchi URL
# Defaults to $::os_service_default.
#
# [*archive_policy*]
# (Optional) The archive policy to use when the dispatcher
# Defaults to $::os_service_default.
@ -26,20 +22,31 @@
# and gnocchi resources/metrics.
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*url*]
# (Optional) Gnocchi URL
# Defaults to undef
#
class ceilometer::dispatcher::gnocchi (
$filter_service_activity = $::os_service_default,
$filter_project = $::os_service_default,
$url = $::os_service_default,
$archive_policy = $::os_service_default,
$resources_definition_file = $::os_service_default,
# DEPRECATED PARAMETERS
$url = undef,
) {
include ::ceilometer::deps
if $url {
warning('url parameter is deprecated, has no effect and will be removed in the Q release.')
}
ceilometer_config {
'dispatcher_gnocchi/filter_service_activity': value => $filter_service_activity;
'dispatcher_gnocchi/filter_project': value => $filter_project;
'dispatcher_gnocchi/url': value => $url;
'dispatcher_gnocchi/archive_policy': value => $archive_policy;
'dispatcher_gnocchi/resources_definition_file': value => $resources_definition_file;
}

View File

@ -0,0 +1,4 @@
---
deprecations:
- url option of ceilometer::dispatcher::gnocchi is now deprecated for
removal, the parameter has no effect.

View File

@ -14,7 +14,6 @@ describe 'ceilometer::dispatcher::gnocchi' do
it 'configures gnocchi dispatcher' do
is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_service_activity').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_project').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('dispatcher_gnocchi/url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('dispatcher_gnocchi/archive_policy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('dispatcher_gnocchi/resources_definition_file').with_value('<SERVICE DEFAULT>')
end
@ -23,13 +22,11 @@ describe 'ceilometer::dispatcher::gnocchi' do
before do
params.merge!(:filter_service_activity => false,
:filter_project => 'gnocchi_swift',
:url => 'http://foo',
:archive_policy => 'high',
:resources_definition_file => 'foo')
end
it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_service_activity').with_value('false') }
it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_project').with_value('gnocchi_swift') }
it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/url').with_value('http://foo') }
it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/archive_policy').with_value('high') }
it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/resources_definition_file').with_value('foo') }
end