Deprecate rabbitmq connection parameters
The rabbitmq connection parameters have been deprecated in favor of the transport_url setting. Change-Id: I097252390fa139a38922f19c2b3c4eedf8d4058f Related-Bug: #1625198
This commit is contained in:
parent
9470f7521a
commit
e94824231f
@ -26,30 +26,6 @@
|
||||
# zmq (for zeromq)
|
||||
# Defaults to 'rabbit'
|
||||
#
|
||||
# [*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
|
||||
#
|
||||
# [*rabbit_use_ssl*]
|
||||
# (optional) Connect over SSL for RabbitMQ
|
||||
# Defaults to $::os_service_default
|
||||
@ -248,17 +224,37 @@
|
||||
# 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
|
||||
#
|
||||
class aodh (
|
||||
$ensure_package = 'present',
|
||||
$alarm_history_time_to_live = $::os_service_default,
|
||||
$default_transport_url = $::os_service_default,
|
||||
$rpc_backend = 'rabbit',
|
||||
$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,
|
||||
$rabbit_use_ssl = $::os_service_default,
|
||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||
$rabbit_heartbeat_rate = $::os_service_default,
|
||||
@ -304,11 +300,29 @@ 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,
|
||||
) inherits aodh::params {
|
||||
|
||||
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) {
|
||||
warning("aodh::rabbit_host, aodh::rabbit_hosts, aodh::rabbit_password, \
|
||||
aodh::rabbit_port, aodh::rabbit_userid and aodh::rabbit_virtual_host are \
|
||||
deprecated. Please use aodh::default_transport_url instead.")
|
||||
}
|
||||
|
||||
package { 'aodh':
|
||||
ensure => $ensure_package,
|
||||
name => $::aodh::params::common_package_name,
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- aodh::rabbit_host, aodh::rabbit_hosts, aodh::rabbit_password,
|
||||
aodh::rabbit_port, aodh::rabbit_userid and aodh::rabbit_virtual_host are
|
||||
deprecated. aodh::default_transport_url should be used to configure the
|
||||
messaging backend connection information.
|
@ -30,11 +30,9 @@ describe 'basic aodh' do
|
||||
Rabbitmq_user_permissions['aodh@/'] -> Service<| tag == 'aodh-service' |>
|
||||
|
||||
class { '::aodh':
|
||||
rabbit_userid => 'aodh',
|
||||
rabbit_password => 'an_even_bigger_secret',
|
||||
debug => true,
|
||||
rabbit_host => '127.0.0.1',
|
||||
database_connection => 'mysql://aodh:a_big_secret@127.0.0.1/aodh?charset=utf8',
|
||||
debug => true,
|
||||
default_transport_url => 'rabbit://aodh:an_even_bigger_secret@127.0.0.1:5672',
|
||||
database_connection => 'mysql://aodh:a_big_secret@127.0.0.1/aodh?charset=utf8',
|
||||
}
|
||||
class { '::aodh::db::mysql':
|
||||
password => 'a_big_secret',
|
||||
|
Loading…
Reference in New Issue
Block a user