Clean up deprecated parameters in the gnocchi::storage class

Change-Id: I4204d05b62af5f30eda92f10065c39883ecf4592
This commit is contained in:
Takashi Kajinami 2020-10-27 00:37:37 +09:00
parent 6fc3f3456f
commit 2c14dcda0d
4 changed files with 16 additions and 45 deletions

View File

@ -35,18 +35,15 @@ class gnocchi (
purge => $purge_config,
}
$coordination_url_real = pick($::gnocchi::storage::coordination_url, $coordination_url)
$storage_package_ensure = pick($::gnocchi::storage::package_ensure, $package_ensure)
if $coordination_url_real {
if $coordination_url {
gnocchi_config {
'DEFAULT/coordination_url' : value => $coordination_url_real;
'DEFAULT/coordination_url' : value => $coordination_url;
}
if ($coordination_url_real =~ /^redis/ ) {
if ($coordination_url =~ /^redis/ ) {
ensure_resource('package', 'python-redis', {
ensure => $storage_package_ensure,
ensure => $package_ensure,
name => $::gnocchi::params::redis_package_name,
tag => 'openstack',
})

View File

@ -38,12 +38,10 @@ class gnocchi::metricd (
include gnocchi::deps
$metric_processing_delay_real = pick($::gnocchi::storage::metric_processing_delay, $metric_processing_delay)
gnocchi_config {
'metricd/workers': value => $workers;
'metricd/metric_cleanup_delay': value => $cleanup_delay;
'metricd/metric_processing_delay': value => $metric_processing_delay_real;
'metricd/metric_processing_delay': value => $metric_processing_delay;
}
package { 'gnocchi-metricd':

View File

@ -13,44 +13,11 @@
# gnocchi::storage
#
# Storage backend for Gnocchi
# This class currently has no effect but is kept as a placeholder.
#
# == Parameters
#
# DEPRECATED PARAMETERS
#
# [*package_ensure*]
# (optional) ensure state for package.
# Defaults to 'present'
#
# [*coordination_url*]
# (optional) The url to use for distributed group membership coordination.
# Defaults to undef
#
# [*metric_processing_delay*]
# (optional) Delay between processng metrics
# Defaults to undef
#
class gnocchi::storage(
# DEPRECATED PARAMETERS
$package_ensure = undef,
$coordination_url = undef,
$metric_processing_delay = undef,
) inherits gnocchi::params {
) {
include gnocchi::deps
if $package_ensure {
warning('The gnocchi::storage::package_ensure parameter was deprecated. \
Use gnocchi::package_ensure instead')
}
if $coordination_url {
warning('The gnocchi::storage::coordination_url parameter was deprecated. \
Use gnocchi::coordination_url instead')
}
if $metric_processing_delay {
warning('The gnocchi::storage::metric_processing_delay parameter was deprecated. \
Use gnocchi::metricd::metric_processing_delay instead')
}
}

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
The following parameters have been removed from the ``gnocchi::storage``
class.
- ``package_ensure``
- ``coordination_url``
- ``metric_processing_delay``