Remove deprecated parameters
Removes deprecated parameters that has been deprecated for one cycle or more. Change-Id: Ic8a697525dd659dff13e91a00b573890e61a30ff
This commit is contained in:
parent
5ab39bbed9
commit
aef7941268
|
@ -168,33 +168,6 @@
|
|||
# (Optional) Run db sync on the node.
|
||||
# Defaults to true
|
||||
#
|
||||
# === DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*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.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_virtual_host*]
|
||||
# (Optional) Virtual_host to use.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*package_name*]
|
||||
# (Optional) Package name to install for congress.
|
||||
# Defaults to $::congress::params::package_name
|
||||
|
@ -203,10 +176,6 @@
|
|||
# (Optional) Ensure state for package.
|
||||
# Defaults to present.
|
||||
#
|
||||
# [*rpc_backend*]
|
||||
# (Optional) Use these options to configure the RabbitMQ message system.
|
||||
# Defaults to 'rabbit'
|
||||
#
|
||||
# == Authors
|
||||
#
|
||||
# Dan Radez <dradez@redhat.com>
|
||||
|
@ -254,30 +223,11 @@ class congress(
|
|||
$sync_db = true,
|
||||
$package_name = $::congress::params::package_name,
|
||||
$package_ensure = 'present',
|
||||
# DEPRECATED PARAMETERS
|
||||
$rabbit_host = $::os_service_default,
|
||||
$rabbit_port = $::os_service_default,
|
||||
$rabbit_hosts = $::os_service_default,
|
||||
$rabbit_virtual_host = $::os_service_default,
|
||||
$rabbit_userid = $::os_service_default,
|
||||
$rabbit_password = $::os_service_default,
|
||||
$rpc_backend = 'rabbit',
|
||||
) inherits congress::params {
|
||||
|
||||
include ::congress::deps
|
||||
include ::congress::logging
|
||||
|
||||
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
|
||||
$rpc_backend or !is_service_default($rabbit_virtual_host) {
|
||||
warning("congress::rabbit_host, congress::rabbit_hosts, congress::rabbit_password, \
|
||||
congress::rabbit_port, congress::rabbit_userid and congress::rabbit_virtual_host and \
|
||||
congress::rpc_backend are deprecated. Please use congress::default_transport_url instead.")
|
||||
}
|
||||
|
||||
package { 'congress-common':
|
||||
ensure => $package_ensure,
|
||||
name => $package_name,
|
||||
|
@ -293,9 +243,6 @@ congress::rpc_backend are deprecated. Please use congress::default_transport_url
|
|||
}
|
||||
|
||||
oslo::messaging::rabbit {'congress_config':
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
rabbit_use_ssl => $rabbit_use_ssl,
|
||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||
heartbeat_rate => $rabbit_heartbeat_rate,
|
||||
|
@ -307,9 +254,6 @@ congress::rpc_backend are deprecated. Please use congress::default_transport_url
|
|||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||
kombu_ssl_version => $kombu_ssl_version,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated parameters congress::rabbit_host, congress::rabbit_hosts, congress::rabbit_password,
|
||||
congress::rabbit_port, congress::rabbit_userid, congress::rabbit_virtual_host and congress::rpc_backend
|
||||
is removed. Please use congress::default_transport_url instead.
|
|
@ -6,9 +6,7 @@ describe 'congress' do
|
|||
|
||||
context 'with default parameters' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
}
|
||||
{}
|
||||
end
|
||||
|
||||
it 'contains the logging class' do
|
||||
|
@ -26,11 +24,6 @@ describe 'congress' do
|
|||
is_expected.to contain_congress_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_userid').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>')
|
||||
|
@ -44,11 +37,7 @@ describe 'congress' do
|
|||
context 'with overridden parameters' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_host => 'rabbit',
|
||||
:rabbit_userid => 'rabbit_user',
|
||||
:rabbit_port => '5673',
|
||||
:rabbit_password => 'password',
|
||||
:rabbit_ha_queues => 'undef',
|
||||
:rabbit_ha_queues => true,
|
||||
:rabbit_heartbeat_timeout_threshold => '60',
|
||||
:rabbit_heartbeat_rate => '10',
|
||||
:kombu_compression => 'gzip',
|
||||
|
@ -56,31 +45,10 @@ describe 'congress' do
|
|||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_host').with_value('rabbit')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_password').with_value('password').with_secret(true)
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_userid').with_value('rabbit_user')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_compression').with_value('gzip')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'with rabbit_hosts parameter' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:rabbit_hosts => ['rabbit:5673', 'rabbit2:5674']
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
|
||||
|
@ -88,27 +56,7 @@ describe 'congress' do
|
|||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with rabbit_hosts parameter (one server)' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:rabbit_hosts => ['rabbit:5673'] }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_oslo__messaging__rabbit('congress_config').with(
|
||||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with default_transport_url parameter' do
|
||||
|
@ -149,7 +97,6 @@ describe 'congress' do
|
|||
context 'with kombu_reconnect_delay set to 5.0' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:kombu_reconnect_delay => '5.0' }
|
||||
end
|
||||
|
||||
|
@ -161,7 +108,6 @@ describe 'congress' do
|
|||
context 'with rabbit_ha_queues set to true' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:rabbit_ha_queues => 'true' }
|
||||
end
|
||||
|
||||
|
@ -170,31 +116,13 @@ describe 'congress' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with rabbit_ha_queues set to false and with rabbit_hosts' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:rabbit_ha_queues => 'false',
|
||||
:rabbit_hosts => ['rabbit:5673'] }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(false)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with amqp_durable_queues parameter' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:rabbit_hosts => ['rabbit:5673'],
|
||||
:amqp_durable_queues => 'true' }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_congress_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true)
|
||||
is_expected.to contain_oslo__messaging__rabbit('congress_config').with(
|
||||
|
@ -206,8 +134,6 @@ describe 'congress' do
|
|||
context 'with rabbit ssl enabled with kombu' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:rabbit_hosts => ['rabbit:5673'],
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => '/etc/ca.cert',
|
||||
:kombu_ssl_certfile => '/etc/certfile',
|
||||
|
@ -229,9 +155,8 @@ describe 'congress' do
|
|||
context 'with rabbit ssl enabled without kombu' do
|
||||
let :params do
|
||||
{
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
:rabbit_hosts => ['rabbit:5673'],
|
||||
:rabbit_use_ssl => true, }
|
||||
:rabbit_use_ssl => true,
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
|
|
Loading…
Reference in New Issue