Deprecate database options from the aodh class

... because these options have been implemented in the aodh::db class.

Change-Id: I261c093be1c685dd57ac0eed1374d702cdb8c11b
This commit is contained in:
Takashi Kajinami 2020-10-20 10:21:49 +09:00
parent f40c746c90
commit f9b9656b17
2 changed files with 63 additions and 14 deletions

View File

@ -184,6 +184,17 @@
# (optional) AMQP topic used for OpenStack notifications
# Defaults to $::os_service_default
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the aodh config.
# Defaults to false.
#
# DEPRECATED PARAMETERS
#
# [*database_min_pool_size*]
# (optional) Minimum number of SQL connections to keep open in a pool.
# Defaults to undef.
#
# [*database_connection*]
# (optional) Connection url for the aodh database.
# Defaults to undef.
@ -212,17 +223,6 @@
# (optional) If set, use this value for max_overflow with sqlalchemy.
# Defaults to: undef.
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the aodh config.
# Defaults to false.
#
# DEPRECATED PARAMETERS
#
# [*database_min_pool_size*]
# (optional) Minimum number of SQL connections to keep open in a pool.
# Defaults to undef.
#
class aodh (
$package_ensure = 'present',
$alarm_history_time_to_live = $::os_service_default,
@ -262,6 +262,9 @@ class aodh (
$notification_transport_url = $::os_service_default,
$notification_driver = $::os_service_default,
$notification_topics = $::os_service_default,
$purge_config = false,
# DEPRECATED PARAMETERS
$database_min_pool_size = undef,
$database_connection = undef,
$slave_connection = undef,
$database_idle_timeout = undef,
@ -269,14 +272,47 @@ class aodh (
$database_max_retries = undef,
$database_retry_interval = undef,
$database_max_overflow = undef,
$purge_config = false,
# DEPRECATED PARAMETERS
$database_min_pool_size = undef,
) inherits aodh::params {
include aodh::deps
include aodh::db
if $database_connection != undef {
warning('The database_connection parameter is deprecated and will be \
removed in a future realse. Use aodh::db::database_connection instead')
}
if $slave_connection != undef {
warning('The slave_connection parameter is deprecated and will be \
removed in a future realse. Use aodh::db::slave_connection instead')
}
if $database_idle_timeout != undef {
warning('The database_idle_timeout parameter is deprecated and will be \
removed in a future realse. Use aodh::db::database_connection_recycle_time \
instead')
}
if $database_max_pool_size != undef {
warning('The database_max_pool_size parameter is deprecated and will be \
removed in a future realse. Use aodh::db::database_max_pool_size instead')
}
if $database_max_retries!= undef {
warning('The database_max_retries parameter is deprecated and will be \
removed in a future realse. Use aodh::db::database_max_retries instead')
}
if $database_retry_interval != undef {
warning('The database_retry_interval parameter is deprecated and will be \
removed in a future realse. Use aodh::db::database_retry_interval instead')
}
if $database_max_overflow != undef {
warning('The database_max_overflow parameter is deprecated and will be \
removed in a future realse. Use aodh::db::database_max_overflow instead')
}
package { 'aodh':
ensure => $package_ensure,
name => $::aodh::params::common_package_name,

View File

@ -0,0 +1,13 @@
---
deprecations:
- |
The following options have been deprecated, as those options have been
moved to aodh::db class.
- ``aodh::database_connection``
- ``aodh::slave_connection``
- ``aodh::database_idle_timeout``
- ``aodh::database_max_overflow``
- ``aodh::database_max_pool_size``
- ``aodh::database_max_retries``
- ``aodh::database_retry_interval``