Merge "Remove deprecated rabbit params"
This commit is contained in:
commit
a61e244737
@ -231,37 +231,6 @@
|
||||
# not necessarily a host name, FQDN, or IP address.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# === 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*]
|
||||
# (Optional) 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.
|
||||
#
|
||||
# [*rpc_backend*]
|
||||
# (Optional) Use these options to configure the RabbitMQ message system.
|
||||
# Defaults to 'rabbit'
|
||||
#
|
||||
class manila (
|
||||
$sql_connection = undef,
|
||||
$sql_idle_timeout = undef,
|
||||
@ -317,14 +286,6 @@ class manila (
|
||||
$amqp_password = $::os_service_default,
|
||||
$purge_config = false,
|
||||
$host = $::os_service_default,
|
||||
# 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',
|
||||
) {
|
||||
|
||||
include ::manila::deps
|
||||
@ -332,17 +293,6 @@ class manila (
|
||||
include ::manila::logging
|
||||
include ::manila::params
|
||||
|
||||
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("manila::rabbit_host, manila::rabbit_hosts, manila::rabbit_password, \
|
||||
manila::rabbit_port, manila::rabbit_userid and manila::rabbit_virtual_host and \
|
||||
manila::rpc_backend are deprecated. Please use manila::default_transport_url instead.")
|
||||
}
|
||||
|
||||
if $use_ssl {
|
||||
if !$cert_file {
|
||||
fail('The cert_file parameter is required when use_ssl is set to true')
|
||||
@ -364,14 +314,8 @@ manila::rpc_backend are deprecated. Please use manila::default_transport_url ins
|
||||
}
|
||||
|
||||
oslo::messaging::rabbit { 'manila_config':
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
rabbit_use_ssl => $rabbit_use_ssl,
|
||||
amqp_durable_queues => $amqp_durable_queues,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated manila::rabbit_host, manila::rabbit_hosts, manila::rabbit_password,
|
||||
manila::rabbit_port, manila::rabbit_userid and manila::rabit_virtual_host are now
|
||||
removed. Please use manila::default_transport_url instead.
|
@ -2,7 +2,6 @@ require 'spec_helper'
|
||||
describe 'manila' do
|
||||
let :req_params do
|
||||
{
|
||||
:rabbit_password => 'guest',
|
||||
:sql_connection => 'mysql+pymysql://user:password@host/database',
|
||||
:purge_config => false,
|
||||
}
|
||||
@ -45,31 +44,12 @@ describe 'manila' do
|
||||
is_expected.to contain_manila_config('DEFAULT/control_exchange').with(
|
||||
:value => 'openstack'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_password').with(
|
||||
:value => 'guest',
|
||||
:secret => true
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_host').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/amqp_durable_queues').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_port').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_hosts').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_ha_queues').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_virtual_host').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_userid').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/kombu_failover_strategy').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
@ -101,44 +81,6 @@ describe 'manila' do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with modified rabbit_hosts' do
|
||||
let :params do
|
||||
req_params.merge({'rabbit_hosts' => ['rabbit1:5672', 'rabbit2:5672']})
|
||||
end
|
||||
|
||||
it 'should contain many' do
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_host').with(
|
||||
:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_port').with(
|
||||
:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_hosts').with(
|
||||
:value => 'rabbit1:5672,rabbit2:5672'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_ha_queues').with(
|
||||
:value => true
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with a single rabbit_hosts entry' do
|
||||
let :params do
|
||||
req_params.merge({'rabbit_hosts' => ['rabbit1:5672']})
|
||||
end
|
||||
|
||||
it 'should contain many' do
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_host').with(
|
||||
:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_port').with(
|
||||
:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_hosts').with(
|
||||
:value => 'rabbit1:5672'
|
||||
)
|
||||
is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_ha_queues').with(
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'a single rabbit_host with enable ha queues' do
|
||||
let :params do
|
||||
req_params.merge({'rabbit_ha_queues' => true})
|
||||
@ -219,7 +161,6 @@ describe 'manila' do
|
||||
let :params do
|
||||
{
|
||||
:sql_connection => 'sqlite:////var/lib/manila/manila.sqlite',
|
||||
:rabbit_password => 'guest',
|
||||
}
|
||||
end
|
||||
|
||||
@ -235,7 +176,6 @@ describe 'manila' do
|
||||
:cert_file => '/path/to/cert',
|
||||
:ca_file => '/path/to/ca',
|
||||
:key_file => '/path/to/key',
|
||||
:rabbit_password => 'guest',
|
||||
}
|
||||
end
|
||||
|
||||
@ -251,7 +191,6 @@ describe 'manila' do
|
||||
:cert_file => false,
|
||||
:ca_file => false,
|
||||
:key_file => false,
|
||||
:rabbit_password => 'guest',
|
||||
}
|
||||
end
|
||||
|
||||
@ -266,7 +205,6 @@ describe 'manila' do
|
||||
:use_ssl => true,
|
||||
:ca_file => '/path/to/ca',
|
||||
:key_file => '/path/to/key',
|
||||
:rabbit_password => 'guest',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -4,7 +4,7 @@ describe 'manila::share' do
|
||||
|
||||
shared_examples_for 'manila-share' do
|
||||
let :pre_condition do
|
||||
'class { "manila": rabbit_password => "fpp", sql_connection => "mysql://a:b@c/d" }'
|
||||
'class { "manila": sql_connection => "mysql://a:b@c/d" }'
|
||||
end
|
||||
|
||||
it { is_expected.to contain_package('manila-share').with(
|
||||
|
Loading…
x
Reference in New Issue
Block a user