Remove deprecated cinder rabbitmq class
Change-Id: Iaa6725b0a2c59b93dc9502f7ccb5323bb46530b5
This commit is contained in:
parent
e22067dac0
commit
84b0c63d4b
@ -1,55 +0,0 @@
|
|||||||
# == Class: cinder::rabbitmq
|
|
||||||
#
|
|
||||||
# Installs and manages rabbitmq server for cinder
|
|
||||||
#
|
|
||||||
# == 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 '/'
|
|
||||||
#
|
|
||||||
class cinder::rabbitmq(
|
|
||||||
$userid = 'guest',
|
|
||||||
$password = 'guest',
|
|
||||||
$virtual_host = '/',
|
|
||||||
) {
|
|
||||||
|
|
||||||
include ::cinder::deps
|
|
||||||
|
|
||||||
warning('cinder::rabbitmq class is deprecated and will be removed in next release. Make other plans to configure rabbitmq resources.')
|
|
||||||
|
|
||||||
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['cinder::service::begin']
|
|
||||||
}
|
|
||||||
rabbitmq_vhost { $virtual_host:
|
|
||||||
provider => 'rabbitmqctl',
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
other:
|
||||||
|
- Remove deprecated cinder rabbitmq class.
|
@ -1,50 +0,0 @@
|
|||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'cinder::rabbitmq' do
|
|
||||||
|
|
||||||
let :facts do
|
|
||||||
{
|
|
||||||
:osfamily => 'Debian',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'with defaults' do
|
|
||||||
|
|
||||||
it 'should contain all of the default resources' do
|
|
||||||
|
|
||||||
is_expected.to contain_rabbitmq_vhost('/').with(
|
|
||||||
:provider => 'rabbitmqctl'
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
describe '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
|
|
||||||
|
|
||||||
end
|
|
Loading…
x
Reference in New Issue
Block a user