Merge "Deprecate rabbitmq connection parameters"
This commit is contained in:
commit
ecc03e120c
@ -17,28 +17,10 @@
|
||||
# rabbit (for rabbitmq)
|
||||
# Defaults to 'rabbit'
|
||||
#
|
||||
# [*rabbit_host*]
|
||||
# (Optional) Host for rabbit server
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# (Optional) List of clustered rabbit servers
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# (Optional) Port for rabbit server
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_userid*]
|
||||
# (Optional) Username used to connecting to rabbit
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_virtual_host*]
|
||||
# (Optional) Virtual host for rabbit server
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_password*]
|
||||
# (Optional) Password used to connect to rabbit
|
||||
# [*default_transport_url*]
|
||||
# (optional) A URL representing the messaging driver to use and its full
|
||||
# configuration. Transport URLs take the form:
|
||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_use_ssl*]
|
||||
@ -68,22 +50,50 @@
|
||||
# in the magnum config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# === DEPRECATED PARAMTERS
|
||||
#
|
||||
# [*rabbit_host*]
|
||||
# (Optional) Host for rabbit server
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# (Optional) List of clustered rabbit servers
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# (Optional) Port for rabbit server
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_userid*]
|
||||
# (Optional) Username used to connecting to rabbit
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_virtual_host*]
|
||||
# (Optional) Virtual host for rabbit server
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_password*]
|
||||
# (Optional) Password used to connect to rabbit
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class magnum(
|
||||
$package_ensure = 'present',
|
||||
$notification_driver = $::os_service_default,
|
||||
$rpc_backend = 'rabbit',
|
||||
$rabbit_host = $::os_service_default,
|
||||
$rabbit_hosts = $::os_service_default,
|
||||
$rabbit_port = $::os_service_default,
|
||||
$rabbit_userid = $::os_service_default,
|
||||
$rabbit_virtual_host = $::os_service_default,
|
||||
$rabbit_password = $::os_service_default,
|
||||
$rabbit_use_ssl = $::os_service_default,
|
||||
$kombu_ssl_ca_certs = $::os_service_default,
|
||||
$kombu_ssl_certfile = $::os_service_default,
|
||||
$kombu_ssl_keyfile = $::os_service_default,
|
||||
$kombu_ssl_version = $::os_service_default,
|
||||
$purge_config = false,
|
||||
$package_ensure = 'present',
|
||||
$notification_driver = $::os_service_default,
|
||||
$rpc_backend = 'rabbit',
|
||||
$default_transport_url = $::os_service_default,
|
||||
$rabbit_use_ssl = $::os_service_default,
|
||||
$kombu_ssl_ca_certs = $::os_service_default,
|
||||
$kombu_ssl_certfile = $::os_service_default,
|
||||
$kombu_ssl_keyfile = $::os_service_default,
|
||||
$kombu_ssl_version = $::os_service_default,
|
||||
$purge_config = false,
|
||||
# DEPRECATED PARAMTERS
|
||||
$rabbit_host = $::os_service_default,
|
||||
$rabbit_hosts = $::os_service_default,
|
||||
$rabbit_port = $::os_service_default,
|
||||
$rabbit_userid = $::os_service_default,
|
||||
$rabbit_virtual_host = $::os_service_default,
|
||||
$rabbit_password = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::magnum::params
|
||||
@ -124,6 +134,10 @@ class magnum(
|
||||
magnum_config { 'DEFAULT/rpc_backend': value => $rpc_backend }
|
||||
}
|
||||
|
||||
oslo::messaging::default { 'magnum_config':
|
||||
transport_url => $default_transport_url,
|
||||
}
|
||||
|
||||
oslo::messaging::notifications { 'magnum_config':
|
||||
driver => $notification_driver
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- magnum::rabbit_host, magnum::rabbit_hosts, magnum::rabbit_password,
|
||||
magnum::rabbit_port, magnum::rabbit_userid and
|
||||
magnum::rabbit_virtual_host are deprecated.
|
||||
magnum::default_transport_url should be used instead.
|
@ -61,13 +61,10 @@ describe 'basic magnum' do
|
||||
}
|
||||
|
||||
class { '::magnum':
|
||||
rabbit_host => '127.0.0.1',
|
||||
rabbit_port => '5672',
|
||||
rabbit_userid => 'magnum',
|
||||
rabbit_password => 'an_even_bigger_secret',
|
||||
rabbit_use_ssl => false,
|
||||
notification_driver => 'messagingv2',
|
||||
}
|
||||
default_transport_url => 'rabbit://magnum:an_even_bigger_secret@127.0.0.1:5672/',
|
||||
rabbit_use_ssl => false,
|
||||
notification_driver => 'messagingv2',
|
||||
}
|
||||
|
||||
class { '::magnum::api':
|
||||
host => '127.0.0.1',
|
||||
|
@ -38,6 +38,7 @@ describe 'magnum' do
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_magnum_config('DEFAULT/rpc_backend').with_value('rabbit')
|
||||
is_expected.to contain_magnum_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_magnum_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE_DEFAULT>')
|
||||
is_expected.to contain_magnum_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE_DEFAULT>').with_secret(true)
|
||||
is_expected.to contain_magnum_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE_DEFAULT>')
|
||||
@ -55,6 +56,7 @@ describe 'magnum' do
|
||||
let :params do
|
||||
{ :package_ensure => 'latest',
|
||||
:notification_driver => 'messagingv1',
|
||||
:transport_url => 'rabbit://user:pass@host:1234/virt',
|
||||
:rabbit_host => '53.210.103.65',
|
||||
:rabbit_port => '1234',
|
||||
:rabbit_userid => 'me',
|
||||
@ -72,6 +74,7 @@ describe 'magnum' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_magnum_config('DEFAULT/transport_url').with_value('rabbit://user:pass@host:1234/virt')
|
||||
is_expected.to contain_magnum_config('oslo_messaging_rabbit/rabbit_host').with_value('53.210.103.65')
|
||||
is_expected.to contain_magnum_config('oslo_messaging_rabbit/rabbit_password').with_value('secrete').with_secret(true)
|
||||
is_expected.to contain_magnum_config('oslo_messaging_rabbit/rabbit_port').with_value('1234')
|
||||
|
Loading…
Reference in New Issue
Block a user