Remove deprecated manila::rabbitmq
... because it was deprecated qute a long ago[1]. [1] 6382396f091616d85a2e372f1ebc3229ef24f286 Change-Id: Ia93dc664f8c3201ec42d960af3e572aadb59bcb5
This commit is contained in:
parent
d735800625
commit
95b04faa01
|
@ -1,66 +0,0 @@
|
|||
# == Class: manila::rabbitmq
|
||||
#
|
||||
# Installs and manages rabbitmq server for manila
|
||||
#
|
||||
# == Parameters:
|
||||
#
|
||||
# [*userid*]
|
||||
# (optional) The username to use when connecting to Rabbit
|
||||
# Defaults to 'guest'
|
||||
#
|
||||
# [*password*]
|
||||
# (optional) The password to use when connecting to Rabbit
|
||||
# Defaults to 'guest'
|
||||
#
|
||||
# [*port*]
|
||||
# (optional) Deprecated. The port to use when connecting to Rabbit
|
||||
# This parameter keeps backward compatibility when we used to manage
|
||||
# RabbitMQ service.
|
||||
# Defaults to '5672'
|
||||
#
|
||||
# [*virtual_host*]
|
||||
# (optional) The virtual host to use when connecting to Rabbit
|
||||
# Defaults to '/'
|
||||
#
|
||||
# [*enabled*]
|
||||
# (optional) Deprecated. Whether to enable the Rabbit resources
|
||||
# This parameter keeps backward compatibility when we used to manage
|
||||
# RabbitMQ service.
|
||||
# Defaults to true
|
||||
#
|
||||
class manila::rabbitmq(
|
||||
$userid = 'guest',
|
||||
$password = 'guest',
|
||||
$virtual_host = '/',
|
||||
# DEPRECATED PARAMETER
|
||||
$enabled = true,
|
||||
$port = '5672',
|
||||
) {
|
||||
|
||||
include manila::deps
|
||||
|
||||
warning('manila::rabbitmq class is deprecated and will be removed in next release. Make other plans to configure rabbitmq resources.')
|
||||
|
||||
if ($enabled) {
|
||||
if $userid == 'guest' {
|
||||
$delete_guest_user = false
|
||||
} else {
|
||||
$delete_guest_user = true
|
||||
rabbitmq_user { $userid:
|
||||
admin => true,
|
||||
password => $password,
|
||||
provider => 'rabbitmqctl',
|
||||
}
|
||||
# I need to figure out the appropriate permissions
|
||||
rabbitmq_user_permissions { "${userid}@${virtual_host}":
|
||||
configure_permission => '.*',
|
||||
write_permission => '.*',
|
||||
read_permission => '.*',
|
||||
provider => 'rabbitmqctl',
|
||||
}->Anchor<| title == 'manila::service::begin' |>
|
||||
}
|
||||
rabbitmq_vhost { $virtual_host:
|
||||
provider => 'rabbitmqctl',
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``manila::rabbitmq`` class to manage rabbitmq resource has been
|
||||
removed.
|
|
@ -1,75 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'manila::rabbitmq' do
|
||||
|
||||
shared_examples_for 'manila::rabbitmq' do
|
||||
context 'with defaults' do
|
||||
|
||||
it 'should contain all of the default resources' do
|
||||
|
||||
is_expected.to contain_rabbitmq_vhost('/').with(
|
||||
:provider => 'rabbitmqctl'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'when a rabbitmq user is specified' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:userid => 'dan',
|
||||
:password => 'pass'
|
||||
}
|
||||
end
|
||||
|
||||
it 'should contain user and permissions' do
|
||||
|
||||
is_expected.to contain_rabbitmq_user('dan').with(
|
||||
:admin => true,
|
||||
:password => 'pass',
|
||||
:provider => 'rabbitmqctl'
|
||||
)
|
||||
|
||||
is_expected.to contain_rabbitmq_user_permissions('dan@/').with(
|
||||
:configure_permission => '.*',
|
||||
:write_permission => '.*',
|
||||
:read_permission => '.*',
|
||||
:provider => 'rabbitmqctl'
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'when disabled' do
|
||||
let :params do
|
||||
{
|
||||
:userid => 'dan',
|
||||
:password => 'pass',
|
||||
:enabled => false
|
||||
}
|
||||
end
|
||||
|
||||
it 'should be disabled' do
|
||||
|
||||
is_expected.to_not contain_rabbitmq_user('dan')
|
||||
is_expected.to_not contain_rabbitmq_user_permissions('dan@/')
|
||||
is_expected.to_not contain_rabbitmq_vhost('/')
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({ :fqdn => 'some.host.tld'}))
|
||||
end
|
||||
it_behaves_like 'manila::rabbitmq'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue