Update swift::keystone::dispersion
• Use the new keystone_user & keystone_user_role parameters • Add email & tenant parameters
This commit is contained in:
parent
a6f98ad3e3
commit
b885ed7488
@ -24,15 +24,19 @@
|
||||
|
||||
class swift::keystone::dispersion(
|
||||
$auth_user = 'dispersion',
|
||||
$auth_pass = 'dispersion_password'
|
||||
$auth_pass = 'dispersion_password',
|
||||
$email = 'swift@localhost',
|
||||
$tenant = 'services',
|
||||
) {
|
||||
|
||||
keystone_user { $auth_user:
|
||||
ensure => present,
|
||||
password => $auth_pass,
|
||||
email => $email,
|
||||
tenant => $tenant,
|
||||
}
|
||||
|
||||
keystone_user_role { "${auth_user}@services":
|
||||
keystone_user_role { "${auth_user}@${tenant}":
|
||||
ensure => present,
|
||||
roles => 'admin',
|
||||
require => Keystone_user[$auth_user]
|
||||
|
@ -6,7 +6,9 @@ describe 'swift::keystone::dispersion' do
|
||||
|
||||
it { should contain_keystone_user('dispersion').with(
|
||||
:ensure => 'present',
|
||||
:password => 'dispersion_password'
|
||||
:password => 'dispersion_password',
|
||||
:email => 'swift@localhost',
|
||||
:tenant => 'services'
|
||||
) }
|
||||
|
||||
it { should contain_keystone_user_role('dispersion@services').with(
|
||||
@ -16,32 +18,25 @@ describe 'swift::keystone::dispersion' do
|
||||
) }
|
||||
end
|
||||
|
||||
describe 'when overriding password' do
|
||||
describe 'when overriding parameters' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:auth_pass => 'foo'
|
||||
:auth_user => 'bar',
|
||||
:auth_pass => 'foo',
|
||||
:email => 'bar@example.com',
|
||||
:tenant => 'dummyTenant'
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_keystone_user('dispersion').with(
|
||||
it { should contain_keystone_user('bar').with(
|
||||
:ensure => 'present',
|
||||
:password => 'foo'
|
||||
:password => 'foo',
|
||||
:email => 'bar@example.com',
|
||||
:tenant => 'dummyTenant'
|
||||
) }
|
||||
|
||||
end
|
||||
|
||||
describe 'when overriding auth user' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:auth_user => 'bar'
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_keystone_user('bar') }
|
||||
|
||||
it { should contain_keystone_user_role('bar@services') }
|
||||
it { should contain_keystone_user_role('bar@dummyTenant') }
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user