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