Deprecate database options from the cinder class
... because these options have been implemented in the cinder::db class. Change-Id: I3fb49fd3b7a1130d85aa077e1660debe3ee2aea5
This commit is contained in:
parent
6a48c51baa
commit
4ec9e95447
@ -197,31 +197,6 @@
|
||||
# http://auth_url:5000/v3
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*database_connection*]
|
||||
# Url used to connect to database.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_idle_timeout*]
|
||||
# Timeout when db connections should be reaped.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_max_pool_size*]
|
||||
# Maximum number of SQL connections to keep open in a pool.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# Maximum db connection retries during startup.
|
||||
# Setting -1 implies an infinite retry count.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_retry_interval*]
|
||||
# Interval between retries of opening a sql connection.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_max_overflow*]
|
||||
# If set, use this value for max_overflow with sqlalchemy.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*storage_availability_zone*]
|
||||
# (optional) Availability zone of the node.
|
||||
# Defaults to 'nova'
|
||||
@ -280,13 +255,32 @@
|
||||
# Minimum number of SQL connections to keep open in a pool.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_connection*]
|
||||
# Url used to connect to database.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_idle_timeout*]
|
||||
# Timeout when db connections should be reaped.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_max_pool_size*]
|
||||
# Maximum number of SQL connections to keep open in a pool.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# Maximum db connection retries during startup.
|
||||
# Setting -1 implies an infinite retry count.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_retry_interval*]
|
||||
# Interval between retries of opening a sql connection.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
# [*database_max_overflow*]
|
||||
# If set, use this value for max_overflow with sqlalchemy.
|
||||
# (Optional) Defaults to undef.
|
||||
#
|
||||
class cinder (
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
$database_max_pool_size = undef,
|
||||
$database_max_retries = undef,
|
||||
$database_retry_interval = undef,
|
||||
$database_max_overflow = undef,
|
||||
$default_transport_url = $::os_service_default,
|
||||
$rpc_response_timeout = $::os_service_default,
|
||||
$control_exchange = 'openstack',
|
||||
@ -341,11 +335,48 @@ class cinder (
|
||||
$backend_host = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$database_min_pool_size = undef,
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
$database_max_pool_size = undef,
|
||||
$database_max_retries = undef,
|
||||
$database_retry_interval = undef,
|
||||
$database_max_overflow = undef,
|
||||
) inherits cinder::params {
|
||||
|
||||
include cinder::deps
|
||||
include cinder::db
|
||||
|
||||
if $database_connection != undef {
|
||||
warning('The database_connection parameter is deprecated and will be \
|
||||
removed in a future realse. Use cinder::db::database_connection instead')
|
||||
}
|
||||
|
||||
if $database_idle_timeout != undef {
|
||||
warning('The database_idle_timeout parameter is deprecated and will be \
|
||||
removed in a future realse. Use cinder::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 cinder::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 cinder::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 cinder::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 cinder::db::database_max_overflow instead')
|
||||
}
|
||||
|
||||
package { 'cinder':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::package_name,
|
||||
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The following options have been deprecated, as those options have been
|
||||
moved to cinder::db class.
|
||||
|
||||
- ``cinder::database_connection``
|
||||
- ``cinder::database_idle_timeout``
|
||||
- ``cinder::database_max_overflow``
|
||||
- ``cinder::database_max_pool_size``
|
||||
- ``cinder::database_max_retries``
|
||||
- ``cinder::database_retry_interval``
|
@ -3,8 +3,7 @@ require 'spec_helper'
|
||||
describe 'cinder' do
|
||||
let :req_params do
|
||||
{
|
||||
:database_connection => 'mysql+pymysql://user:password@host/database',
|
||||
:lock_path => '/var/lock/cinder',
|
||||
:lock_path => '/var/lock/cinder',
|
||||
}
|
||||
end
|
||||
|
||||
@ -15,7 +14,6 @@ describe 'cinder' do
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('cinder::params') }
|
||||
it { is_expected.to contain_class('mysql::bindings::python') }
|
||||
|
||||
it { is_expected.to contain_resources('cinder_config').with_purge(false) }
|
||||
|
||||
@ -208,18 +206,6 @@ describe 'cinder' do
|
||||
}
|
||||
end
|
||||
|
||||
context 'with postgresql' do
|
||||
let :params do
|
||||
{
|
||||
:database_connection => 'postgresql://user:drowssap@host/database',
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.not_to contain_class('mysql::python') }
|
||||
it { is_expected.not_to contain_class('mysql::bindings') }
|
||||
it { is_expected.not_to contain_class('mysql::bindings::python') }
|
||||
end
|
||||
|
||||
context 'with APIs set for Mitaka (proposed)' do
|
||||
let :params do
|
||||
{
|
||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
describe 'cinder::volume' do
|
||||
let :pre_condition do
|
||||
"class { 'cinder':
|
||||
"class { 'cinder::db':
|
||||
database_connection => 'mysql://a:b@c/d'
|
||||
}"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user