Remove deprecated parameters
Removes deprecated parameters that has been deprecated for one cycle or more. Change-Id: Iaf45947643b0fb6495fa44c6410a7e6e98aac197
This commit is contained in:
parent
8bd5ec7194
commit
bf5d06f640
|
@ -233,39 +233,6 @@
|
|||
# in the aodh config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# === DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*rabbit_host*]
|
||||
# (optional) Location of rabbitmq installation.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# (optional) List of clustered rabbit servers.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# (optional) Port for rabbitmq instance.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_password*]
|
||||
# (optional) Password used to connect to rabbitmq.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_userid*]
|
||||
# (optional) User used to connect to rabbitmq.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_virtual_host*]
|
||||
# (optional) The RabbitMQ virtual host.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rpc_backend*]
|
||||
# (optional) The rpc backend implementation to use, can be:
|
||||
# amqp (for AMQP 1.0 protocol)
|
||||
# rabbit (for rabbitmq)
|
||||
# zmq (for zeromq)
|
||||
# Defaults to undef
|
||||
#
|
||||
class aodh (
|
||||
$package_ensure = 'present',
|
||||
$alarm_history_time_to_live = $::os_service_default,
|
||||
|
@ -318,33 +285,12 @@ class aodh (
|
|||
$database_max_overflow = undef,
|
||||
$gnocchi_url = $::os_service_default,
|
||||
$purge_config = false,
|
||||
# DEPRECATED
|
||||
$rabbit_host = $::os_service_default,
|
||||
$rabbit_hosts = $::os_service_default,
|
||||
$rabbit_password = $::os_service_default,
|
||||
$rabbit_port = $::os_service_default,
|
||||
$rabbit_userid = $::os_service_default,
|
||||
$rabbit_virtual_host = $::os_service_default,
|
||||
$rpc_backend = undef,
|
||||
) inherits aodh::params {
|
||||
|
||||
include ::aodh::deps
|
||||
include ::aodh::db
|
||||
include ::aodh::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
|
||||
!is_service_default($rabbit_virtual_host) or
|
||||
$rpc_backend {
|
||||
warning("aodh::rabbit_host, aodh::rabbit_hosts, aodh::rabbit_password, \
|
||||
aodh::rabbit_port, aodh::rabbit_userid, aodh::rabbit_virtual_host and \
|
||||
aodh::rpc_backend are deprecated. Please use aodh::default_transport_url \
|
||||
instead.")
|
||||
}
|
||||
|
||||
package { 'aodh':
|
||||
ensure => $package_ensure,
|
||||
name => $::aodh::params::common_package_name,
|
||||
|
@ -356,12 +302,6 @@ instead.")
|
|||
}
|
||||
|
||||
oslo::messaging::rabbit { 'aodh_config':
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||
heartbeat_rate => $rabbit_heartbeat_rate,
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated parameters aodh::rabbit_host, aodh::rabbit_hosts, aodh::rabbit_password,
|
||||
aodh::rabbit_userid, aodh::rabbit_port and aodh::rabbit_virtual_host is removed.
|
||||
Please use aodh::default_transport_url instead.
|
||||
- |
|
||||
The deprecated parameter aodh::rpc_backend is removed.
|
|
@ -29,11 +29,6 @@ describe 'aodh' do
|
|||
is_expected.to contain_aodh_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_userid').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>')
|
||||
|
@ -55,10 +50,6 @@ describe 'aodh' do
|
|||
{
|
||||
:debug => true,
|
||||
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
|
||||
:rabbit_host => 'rabbit',
|
||||
:rabbit_userid => 'rabbit_user',
|
||||
:rabbit_port => '5673',
|
||||
:rabbit_password => 'password',
|
||||
:rabbit_ha_queues => 'undef',
|
||||
:rabbit_heartbeat_timeout_threshold => '60',
|
||||
:rabbit_heartbeat_rate => '10',
|
||||
|
@ -74,11 +65,6 @@ describe 'aodh' do
|
|||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_aodh_config('DEFAULT/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_host').with_value('rabbit')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_password').with_value('password').with_secret(true)
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_userid').with_value('rabbit_user')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('60')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/heartbeat_rate').with_value('10')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_compression').with_value('gzip')
|
||||
|
@ -102,51 +88,15 @@ describe 'aodh' do
|
|||
|
||||
end
|
||||
|
||||
context 'with rabbit_hosts parameter' do
|
||||
context 'with kombu_reconnect_delay set to 5.0 and kombu_failover_strategy' do
|
||||
let :params do
|
||||
{ :rabbit_hosts => ['rabbit:5673', 'rabbit2:5674'] }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_oslo__messaging__rabbit('aodh_config').with(
|
||||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with rabbit_hosts parameter (one server)' do
|
||||
let :params do
|
||||
{ :rabbit_hosts => ['rabbit:5673'] }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_oslo__messaging__rabbit('aodh_config').with(
|
||||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with kombu_reconnect_delay set to 5.0' do
|
||||
let :params do
|
||||
{ :kombu_reconnect_delay => '5.0' }
|
||||
{ :kombu_reconnect_delay => '5.0',
|
||||
:kombu_failover_strategy => 'test' }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('5.0')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('test')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -160,10 +110,9 @@ describe 'aodh' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with rabbit_ha_queues set to false and with rabbit_hosts' do
|
||||
context 'with rabbit_ha_queues set to false' do
|
||||
let :params do
|
||||
{ :rabbit_ha_queues => 'false',
|
||||
:rabbit_hosts => ['rabbit:5673'] }
|
||||
{ :rabbit_ha_queues => 'false' }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
|
@ -173,14 +122,10 @@ describe 'aodh' do
|
|||
|
||||
context 'with amqp_durable_queues parameter' do
|
||||
let :params do
|
||||
{ :rabbit_hosts => ['rabbit:5673'],
|
||||
:amqp_durable_queues => 'true' }
|
||||
{ :amqp_durable_queues => 'true' }
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true)
|
||||
is_expected.to contain_oslo__messaging__rabbit('aodh_config').with(
|
||||
|
@ -191,8 +136,7 @@ describe 'aodh' do
|
|||
|
||||
context 'with rabbit ssl enabled with kombu' do
|
||||
let :params do
|
||||
{ :rabbit_hosts => ['rabbit:5673'],
|
||||
:rabbit_use_ssl => true,
|
||||
{ :rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => '/etc/ca.cert',
|
||||
:kombu_ssl_certfile => '/etc/certfile',
|
||||
:kombu_ssl_keyfile => '/etc/key',
|
||||
|
@ -210,12 +154,11 @@ describe 'aodh' do
|
|||
|
||||
context 'with rabbit ssl enabled without kombu' do
|
||||
let :params do
|
||||
{ :rabbit_hosts => ['rabbit:5673'],
|
||||
:rabbit_use_ssl => true, }
|
||||
{ :rabbit_use_ssl => true, }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__messaging__rabbit('aodh_config').with(
|
||||
:rabbit_use_ssl => true,
|
||||
:rabbit_use_ssl => true,
|
||||
)}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue