Inconsistent package_ensure parameter name
The parameter name used to enforce package state is inconsistent across manifests and modules. I settle on package_ensure since it's already widely used. Change-Id: I5f19aec39094c446904d5517e66141401ff149ae Closes-Bug: #1668732
This commit is contained in:
parent
4f5eee5a5c
commit
c8dc4eb3f7
|
@ -8,17 +8,33 @@
|
|||
# Url used to connect to database.
|
||||
# (Optional) Defaults to 'sqlite:////var/lib/gnocchi/gnocchi.sqlite'.
|
||||
#
|
||||
# [*ensure_package*]
|
||||
# [*package_ensure*]
|
||||
# (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',
|
||||
$ensure_package = 'present',
|
||||
$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)
|
||||
|
@ -62,7 +78,7 @@ class gnocchi::db (
|
|||
}
|
||||
|
||||
package { 'gnocchi-indexer-sqlalchemy':
|
||||
ensure => $ensure_package,
|
||||
ensure => $package_ensure_real,
|
||||
name => $::gnocchi::params::indexer_package_name,
|
||||
tag => ['openstack', 'gnocchi-package'],
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*ensure_package*]
|
||||
# [*package_ensure*]
|
||||
# (optional) The state of gnocchi packages
|
||||
# Defaults to 'present'
|
||||
#
|
||||
|
@ -39,8 +39,14 @@
|
|||
# in the gnocchi config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*ensure_package*]
|
||||
# (optional) The state of gnocchi packages
|
||||
# Defaults to undef
|
||||
#
|
||||
class gnocchi (
|
||||
$ensure_package = 'present',
|
||||
$package_ensure = 'present',
|
||||
$debug = undef,
|
||||
$use_syslog = undef,
|
||||
$use_stderr = undef,
|
||||
|
@ -48,14 +54,24 @@ 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 => $ensure_package,
|
||||
ensure => $package_ensure_real,
|
||||
name => $::gnocchi::params::common_package_name,
|
||||
tag => ['openstack', 'gnocchi-package'],
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
deprecations:
|
||||
- gnocchi::ensure_package is now deprecated and will be removed in the
|
||||
future release. Please use gnocchi::package_ensure instead.
|
||||
- gnocchi::db::ensure_package is now deprecated and will be removed in the
|
||||
future release. Please use gnocchi::db::package_ensure instead.
|
Loading…
Reference in New Issue