Deprecate database options from the mistral class

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

Change-Id: I091757cb8ae82b93790f5a76829f0e1434951c47
This commit is contained in:
Takashi Kajinami 2020-10-20 13:05:23 +09:00
parent c08d21dc7d
commit cc1705aa9c
3 changed files with 19 additions and 19 deletions

View File

@ -13,10 +13,6 @@
# communication with OpenStack services
# Defaults to $::os_service_default
#
# [*database_connection*]
# (optional) Url used to connect to database.
# Defaults to undef.
#
# [*default_transport_url*]
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
@ -164,9 +160,14 @@
# heartbeat.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*database_connection*]
# (optional) Url used to connect to database.
# Defaults to undef.
#
class mistral(
$package_ensure = 'present',
$database_connection = undef,
$os_actions_endpoint_type = $::os_service_default,
$control_exchange = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
@ -195,12 +196,19 @@ class mistral(
$max_missed_heartbeats = $::os_service_default,
$check_interval = $::os_service_default,
$first_heartbeat_timeout = $::os_service_default,
# DEPRECATED PARAMETERS
$database_connection = undef,
){
include mistral::deps
include mistral::params
include mistral::db
if $database_connection != undef {
warning('The database_connection parameter is deprecated and will be \
removed in a future realse. Use mistral::db::database_connection instead')
}
package { 'mistral-common':
ensure => $package_ensure,
name => $::mistral::params::common_package_name,

View File

@ -0,0 +1,6 @@
---
deprecations:
- |
The ``mistrall::database_connection`` has been deprecated and will be
removed in a future release. Use the ``mistral::db::database_connection``
parameter instead.

View File

@ -3,7 +3,6 @@ require 'spec_helper'
describe 'mistral' do
let :req_params do
{
:database_connection => 'mysql://user:password@host/database',
:purge_config => false,
}
end
@ -21,7 +20,6 @@ describe 'mistral' do
end
it { should contain_class('mistral::params') }
it { should contain_class('mysql::bindings::python') }
it 'passes purge to resource' do
should contain_resources('mistral_config').with({
@ -184,18 +182,6 @@ describe 'mistral' do
it { should contain_mistral_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true) }
end
context 'with postgresql' do
let :params do
req_params.merge({
:database_connection => 'postgresql://user:drowssap@host/database',
})
end
it { should_not contain_class('mysql::python') }
it { should_not contain_class('mysql::bindings') }
it { should_not contain_class('mysql::bindings::python') }
end
context 'with coordination' do
let :params do
req_params.merge({