Update class params to os_service_default
This patch will update the parameters class using the default fact $::os_service_default Also the parameters order in the class doc is fixed and ordered according the class parameters. Change-Id: Iace9cd7e3706f8c9c500dcb9037e4e93a6217105
This commit is contained in:
parent
4d6b781b7c
commit
d09f8483f1
|
@ -10,37 +10,37 @@
|
||||||
#
|
#
|
||||||
# [*database_idle_timeout*]
|
# [*database_idle_timeout*]
|
||||||
# Timeout when db connections should be reaped.
|
# Timeout when db connections should be reaped.
|
||||||
# (Optional) Defaults to 3600.
|
# (Optional) Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*database_min_pool_size*]
|
||||||
|
# Minimum number of SQL connections to keep open in a pool.
|
||||||
|
# (Optional) Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*database_max_pool_size*]
|
||||||
|
# Maximum number of SQL connections to keep open in a pool.
|
||||||
|
# (Optional) Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*database_max_retries*]
|
# [*database_max_retries*]
|
||||||
# Maximum number of database connection retries during startup.
|
# Maximum number of database connection retries during startup.
|
||||||
# Setting -1 implies an infinite retry count.
|
# Setting -1 implies an infinite retry count.
|
||||||
# (Optional) Defaults to 10.
|
# (Optional) Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*database_retry_interval*]
|
# [*database_retry_interval*]
|
||||||
# Interval between retries of opening a database connection.
|
# Interval between retries of opening a database connection.
|
||||||
# (Optional) Defaults to 10.
|
# (Optional) Defaults to $::os_service_default.
|
||||||
#
|
|
||||||
# [*database_min_pool_size*]
|
|
||||||
# Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# (Optional) Defaults to 1.
|
|
||||||
#
|
|
||||||
# [*database_max_pool_size*]
|
|
||||||
# Maximum number of SQL connections to keep open in a pool.
|
|
||||||
# (Optional) Defaults to 10.
|
|
||||||
#
|
#
|
||||||
# [*database_max_overflow*]
|
# [*database_max_overflow*]
|
||||||
# If set, use this value for max_overflow with sqlalchemy.
|
# If set, use this value for max_overflow with sqlalchemy.
|
||||||
# (Optional) Defaults to 20.
|
# (Optional) Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
class aodh::db (
|
class aodh::db (
|
||||||
$database_connection = 'sqlite:////var/lib/aodh/aodh.sqlite',
|
$database_connection = 'sqlite:////var/lib/aodh/aodh.sqlite',
|
||||||
$database_idle_timeout = 3600,
|
$database_idle_timeout = $::os_service_default,
|
||||||
$database_min_pool_size = 1,
|
$database_min_pool_size = $::os_service_default,
|
||||||
$database_max_pool_size = 10,
|
$database_max_pool_size = $::os_service_default,
|
||||||
$database_max_retries = 10,
|
$database_max_retries = $::os_service_default,
|
||||||
$database_retry_interval = 10,
|
$database_retry_interval = $::os_service_default,
|
||||||
$database_max_overflow = 20,
|
$database_max_overflow = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$database_connection_real = pick($::aodh::database_connection, $database_connection)
|
$database_connection_real = pick($::aodh::database_connection, $database_connection)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- Updated the parameters for aodh::db class,
|
||||||
|
using the default fact $::os_service_default
|
|
@ -7,10 +7,10 @@ describe 'aodh::db' do
|
||||||
context 'with default parameters' do
|
context 'with default parameters' do
|
||||||
|
|
||||||
it { is_expected.to contain_aodh_config('database/connection').with_value('sqlite:////var/lib/aodh/aodh.sqlite') }
|
it { is_expected.to contain_aodh_config('database/connection').with_value('sqlite:////var/lib/aodh/aodh.sqlite') }
|
||||||
it { is_expected.to contain_aodh_config('database/idle_timeout').with_value('3600') }
|
it { is_expected.to contain_aodh_config('database/idle_timeout').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_aodh_config('database/min_pool_size').with_value('1') }
|
it { is_expected.to contain_aodh_config('database/min_pool_size').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_aodh_config('database/max_retries').with_value('10') }
|
it { is_expected.to contain_aodh_config('database/max_retries').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_aodh_config('database/retry_interval').with_value('10') }
|
it { is_expected.to contain_aodh_config('database/retry_interval').with_value('<SERVICE DEFAULT>') }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue