Remove deprecated ensure_package option

Change-Id: I4f4e1993795625a24785ce548cd06f2447e13349
This commit is contained in:
ZhongShengping 2018-03-29 12:01:15 +08:00
parent 737b2dbd15
commit e3b7c250a8
3 changed files with 5 additions and 34 deletions

View File

@ -12,29 +12,13 @@
# (optional) The state of gnocchi packages
# Defaults to 'present'
#
# DEPRECATED PARAMETERS
#
# [*ensure_package*]
# (optional) The state of gnocchi packages
# Defaults to undef
#
class gnocchi::db (
$database_connection = 'sqlite:////var/lib/gnocchi/gnocchi.sqlite',
$package_ensure = 'present',
# DEPRECATED PARAMETERS
$ensure_package = undef,
) inherits gnocchi::params {
include ::gnocchi::deps
if $ensure_package {
warning("gnocchi::db::ensure_package is deprecated and will be removed in \
the future release. Please use gnocchi::db::package_ensure instead.")
$package_ensure_real = $ensure_package
} else {
$package_ensure_real = $package_ensure
}
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use gnocchi::<myparam> if gnocchi::db::<myparam> isn't specified.
$database_connection_real = pick($::gnocchi::database_connection, $database_connection)
@ -80,7 +64,7 @@ the future release. Please use gnocchi::db::package_ensure instead.")
# NOTE(tobasco): gnocchi-indexer-sqlalchemy not packaged in Ubuntu for Queens release.
if $::osfamily != 'Debian' {
package { 'gnocchi-indexer-sqlalchemy':
ensure => $package_ensure_real,
ensure => $package_ensure,
name => $::gnocchi::params::indexer_package_name,
tag => ['openstack', 'gnocchi-package'],
}

View File

@ -39,12 +39,6 @@
# in the gnocchi config.
# Defaults to false.
#
# DEPRECATED PARAMETERS
#
# [*ensure_package*]
# (optional) The state of gnocchi packages
# Defaults to undef
#
class gnocchi (
$package_ensure = 'present',
$debug = undef,
@ -54,24 +48,14 @@ class gnocchi (
$log_facility = undef,
$database_connection = undef,
$purge_config = false,
# DEPRECATED PARAMETERS
$ensure_package = undef,
) inherits gnocchi::params {
include ::gnocchi::deps
include ::gnocchi::db
include ::gnocchi::logging
if $ensure_package {
warning("gnocchi::ensure_package is deprecated and will be removed in \
the future release. Please use gnocchi::package_ensure instead.")
$package_ensure_real = $ensure_package
} else {
$package_ensure_real = $package_ensure
}
package { 'gnocchi':
ensure => $package_ensure_real,
ensure => $package_ensure,
name => $::gnocchi::params::common_package_name,
tag => ['openstack', 'gnocchi-package'],
}

View File

@ -0,0 +1,3 @@
---
upgrade:
- Deprecated ensure_package option has been removed.