Merge "Deprecate database options from the mistral class"
This commit is contained in:
commit
05452890f7
|
@ -13,10 +13,6 @@
|
||||||
# communication with OpenStack services
|
# communication with OpenStack services
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*database_connection*]
|
|
||||||
# (optional) Url used to connect to database.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*default_transport_url*]
|
# [*default_transport_url*]
|
||||||
# (optional) A URL representing the messaging driver to use and its full
|
# (optional) A URL representing the messaging driver to use and its full
|
||||||
# configuration. Transport URLs take the form:
|
# configuration. Transport URLs take the form:
|
||||||
|
@ -164,9 +160,14 @@
|
||||||
# heartbeat.
|
# heartbeat.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*database_connection*]
|
||||||
|
# (optional) Url used to connect to database.
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
class mistral(
|
class mistral(
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$database_connection = undef,
|
|
||||||
$os_actions_endpoint_type = $::os_service_default,
|
$os_actions_endpoint_type = $::os_service_default,
|
||||||
$control_exchange = $::os_service_default,
|
$control_exchange = $::os_service_default,
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $::os_service_default,
|
||||||
|
@ -195,12 +196,19 @@ class mistral(
|
||||||
$max_missed_heartbeats = $::os_service_default,
|
$max_missed_heartbeats = $::os_service_default,
|
||||||
$check_interval = $::os_service_default,
|
$check_interval = $::os_service_default,
|
||||||
$first_heartbeat_timeout = $::os_service_default,
|
$first_heartbeat_timeout = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_connection = undef,
|
||||||
){
|
){
|
||||||
|
|
||||||
include mistral::deps
|
include mistral::deps
|
||||||
include mistral::params
|
include mistral::params
|
||||||
include mistral::db
|
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':
|
package { 'mistral-common':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
name => $::mistral::params::common_package_name,
|
name => $::mistral::params::common_package_name,
|
||||||
|
|
|
@ -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.
|
|
@ -3,7 +3,6 @@ require 'spec_helper'
|
||||||
describe 'mistral' do
|
describe 'mistral' do
|
||||||
let :req_params do
|
let :req_params do
|
||||||
{
|
{
|
||||||
:database_connection => 'mysql://user:password@host/database',
|
|
||||||
:purge_config => false,
|
:purge_config => false,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -21,7 +20,6 @@ describe 'mistral' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_class('mistral::params') }
|
it { should contain_class('mistral::params') }
|
||||||
it { should contain_class('mysql::bindings::python') }
|
|
||||||
|
|
||||||
it 'passes purge to resource' do
|
it 'passes purge to resource' do
|
||||||
should contain_resources('mistral_config').with({
|
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) }
|
it { should contain_mistral_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true) }
|
||||||
end
|
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
|
context 'with coordination' do
|
||||||
let :params do
|
let :params do
|
||||||
req_params.merge({
|
req_params.merge({
|
||||||
|
|
Loading…
Reference in New Issue