deprecate dispatcher::gnocchi::archive_policy

The archive_policy option of ceilometer::dispatcher::gnocchi is
deprecated and should be removed.

So this change deprecate it for removal.

Depends-On: Ide510f355361737230efcd89ff78ff974bc96134
Change-Id: Ic60b7189c3bfc01f59889ffbd35adaba9c00f559
This commit is contained in:
Mehdi Abaakouk
2017-03-22 14:50:44 +01:00
parent 2e25568305
commit 1a4bdd359d
3 changed files with 13 additions and 9 deletions

View File

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

View File

@@ -0,0 +1,4 @@
---
deprecations:
- archive_policy 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/archive_policy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('dispatcher_gnocchi/resources_definition_file').with_value('<SERVICE DEFAULT>')
end
@@ -22,12 +21,10 @@ describe 'ceilometer::dispatcher::gnocchi' do
before do
params.merge!(:filter_service_activity => false,
:filter_project => 'gnocchi_swift',
: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/archive_policy').with_value('high') }
it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/resources_definition_file').with_value('foo') }
end
end