Remove deprecated database_connection in init
Change-Id: I92f04101059ae5711f91df8740141ad532bc053c
This commit is contained in:
parent
f7e1857771
commit
fca0e2d424
|
@ -19,19 +19,15 @@ class gnocchi::db (
|
|||
|
||||
include gnocchi::deps
|
||||
|
||||
# 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)
|
||||
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection_real,
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection,
|
||||
['^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
|
||||
if $database_connection_real {
|
||||
case $database_connection_real {
|
||||
if $database_connection {
|
||||
case $database_connection {
|
||||
/^mysql(\+pymysql)?:\/\//: {
|
||||
require mysql::bindings
|
||||
require mysql::bindings::python
|
||||
if $database_connection_real =~ /^mysql\+pymysql/ {
|
||||
if $database_connection =~ /^mysql\+pymysql/ {
|
||||
$backend_package = $::gnocchi::params::pymysql_package_name
|
||||
} else {
|
||||
$backend_package = false
|
||||
|
@ -58,7 +54,7 @@ class gnocchi::db (
|
|||
}
|
||||
|
||||
gnocchi_config {
|
||||
'indexer/url': value => $database_connection_real, secret => true;
|
||||
'indexer/url': value => $database_connection, secret => true;
|
||||
}
|
||||
|
||||
# NOTE(tobasco): gnocchi-indexer-sqlalchemy not packaged in Ubuntu for Queens release.
|
||||
|
|
|
@ -17,27 +17,13 @@
|
|||
# in the gnocchi config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*database_connection*]
|
||||
# (optional) Connection url for the gnocchi database.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class gnocchi (
|
||||
$package_ensure = 'present',
|
||||
$coordination_url = $::os_service_default,
|
||||
$purge_config = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$database_connection = undef,
|
||||
) inherits gnocchi::params {
|
||||
|
||||
include gnocchi::deps
|
||||
include gnocchi::db
|
||||
|
||||
if $database_connection {
|
||||
warning('The gnocchi::database_connection parameter is deprecated. \
|
||||
Use gnocchi::db::database_connection instead.')
|
||||
}
|
||||
|
||||
package { 'gnocchi':
|
||||
ensure => $package_ensure,
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated gnocchi::database_connection parameter is removed.
|
||||
Use the gnocchi:db::database_connection parameter instead.
|
||||
- |
|
||||
Deployments now need to explicitly use the gnocchi::db class.
|
Loading…
Reference in New Issue