Remove deprecated rabbit params

Remove the deprecated rabbit params which has been deprecated for
two years. The default_transport_url has been present for a while
now and should be used.

Change-Id: Iffed46781ef7c9daee5155dffa381c2a86dc8dcf
This commit is contained in:
ZhongShengping 2018-05-24 10:42:40 +08:00
parent 5f39db147c
commit 97425d5b64
4 changed files with 6 additions and 89 deletions

View File

@ -179,36 +179,6 @@
#
# === DEPRECATED PARAMTERS
#
# [*rabbit_host*]
# (Optional) IP or hostname of the rabbit server.
# Defaults to $::os_service_default
#
# [*rabbit_port*]
# (Optional) Port of the rabbit server.
# Defaults to $::os_service_default
#
# [*rabbit_hosts*]
# (Optional) Array of host:port (used with HA queues).
# If defined, will remove rabbit_host & rabbit_port parameters from config
# Defaults to $::os_service_default
#
# [*rabbit_userid*]
# (Optional) User to connect to the rabbit server.
# Defaults to $::os_service_default
#
# [*rabbit_password*]
# (Required) Password to connect to the rabbit_server.
# Required if using the Rabbit (kombu) backend.
# Default to $::os_service_default
#
# [*rabbit_virtual_host*]
# (Optional) Virtual_host to use.
# Defaults to $::os_service_default
#
# [*rpc_backend*]
# (optional) The rpc backend.
# Defaults to $::os_service_default.
#
# [*auth_uri*]
# (optional) Specifies the public Identity URI for Mistral to use.
# Default undef.
@ -262,13 +232,6 @@ class mistral(
$purge_config = false,
$sync_db = true,
# DEPRECATED PARAMETERS
$rabbit_host = $::os_service_default,
$rabbit_port = $::os_service_default,
$rabbit_hosts = $::os_service_default,
$rabbit_userid = $::os_service_default,
$rabbit_password = $::os_service_default,
$rabbit_virtual_host = $::os_service_default,
$rpc_backend = $::os_service_default,
$keystone_password = undef,
$keystone_user = undef,
$keystone_tenant = undef,
@ -284,19 +247,6 @@ class mistral(
validate_string($keystone_password)
if !is_service_default($rabbit_host) or
!is_service_default($rabbit_hosts) or
!is_service_default($rabbit_password) or
!is_service_default($rabbit_port) or
!is_service_default($rabbit_userid) or
!is_service_default($rabbit_virtual_host) or
!is_service_default($rpc_backend) {
warning("mistral::rabbit_host, mistral::rabbit_hosts, mistral::rabbit_password, \
mistral::rabbit_port, mistral::rabbit_userid, mistral::rabbit_virtual_host and \
mistral::rpc_backend are deprecated. Please use mistral::default_transport_url \
instead.")
}
package { 'mistral-common':
ensure => $package_ensure,
name => $::mistral::params::common_package_name,
@ -328,12 +278,6 @@ instead.")
}
oslo::messaging::rabbit {'mistral_config':
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_hosts => $rabbit_hosts,
rabbit_password => $rabbit_password,
rabbit_userid => $rabbit_userid,
rabbit_virtual_host => $rabbit_virtual_host,
rabbit_ha_queues => $rabbit_ha_queues,
rabbit_use_ssl => $rabbit_use_ssl,
kombu_failover_strategy => $kombu_failover_strategy,

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The deprecated mistral::rabbit_host, mistral::rabbit_hosts, mistral::rabbit_password,
mistral::rabbit_port, mistral::rabbit_userid and mistral::rabit_virtual_host are now
removed. Please use mistral::default_transport_url instead.

View File

@ -91,7 +91,6 @@ describe 'mistral::api' do
include ::mistral::db
class { '::mistral':
keystone_password => 'foo',
rabbit_password => 'bar',
}"
end

View File

@ -40,15 +40,9 @@ describe 'mistral' do
is_expected.to contain_mistral_config('oslo_messaging_notifications/transport_url').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_notifications/driver').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_notifications/topics').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_password').with(:value => '<SERVICE DEFAULT>', :secret => true)
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_virtual_host').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_userid').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_reconnect_delay').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_failover_strategy').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('coordination/backend_url').with(:value => '<SERVICE DEFAULT>')
@ -74,31 +68,6 @@ describe 'mistral' do
end
end
describe 'with modified rabbit_hosts' do
let :params do
req_params.merge({'rabbit_hosts' => ['rabbit1:5672', 'rabbit2:5672']})
end
it 'should contain many' do
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672,rabbit2:5672')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => true)
end
end
describe 'with a single rabbit_hosts entry' do
let :params do
req_params.merge({'rabbit_hosts' => ['rabbit1:5672']})
end
it 'should contain many' do
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => '<SERVICE DEFAULT>')
end
end
describe 'a single rabbit_host with enable ha queues' do
let :params do
@ -213,7 +182,6 @@ describe 'mistral' do
let :params do
req_params.merge({
:database_connection => 'postgresql://user:drowssap@host/database',
:rabbit_password => 'guest',
})
end