identity: ability to disable swift

Close bug #178

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2014-02-11 09:47:34 +01:00
parent f807115f25
commit b961bb1122
2 changed files with 26 additions and 12 deletions

View File

@ -324,6 +324,7 @@
# Defaults value in params
#
class cloud::identity (
$swift_enabled = $os_params::swift,
$identity_roles_addons = $os_params::identity_roles_addons,
$keystone_db_host = $os_params::keystone_db_host,
$keystone_db_user = $os_params::keystone_db_user,
@ -454,19 +455,21 @@ class cloud::identity (
# ssl => false
# }
class {'swift::keystone::auth':
address => $ks_swift_internal_host,
password => $ks_swift_password,
public_address => $ks_swift_public_host,
public_port => $ks_swift_public_port,
public_protocol => $ks_swift_public_proto,
admin_address => $ks_swift_admin_host,
internal_address => $ks_swift_internal_host,
region => $region
}
if $swift_enabled {
class {'swift::keystone::auth':
address => $ks_swift_internal_host,
password => $ks_swift_password,
public_address => $ks_swift_public_host,
public_port => $ks_swift_public_port,
public_protocol => $ks_swift_public_proto,
admin_address => $ks_swift_admin_host,
internal_address => $ks_swift_internal_host,
region => $region
}
class {'swift::keystone::dispersion':
auth_pass => $ks_swift_dispersion_password
class {'swift::keystone::dispersion':
auth_pass => $ks_swift_dispersion_password
}
}
class {'ceilometer::keystone::auth':

View File

@ -24,6 +24,7 @@ describe 'cloud::identity' do
let :params do
{ :identity_roles_addons => ['SwiftOperator', 'ResellerAdmin'],
:swift_enabled => true,
:keystone_db_host => '10.0.0.1',
:keystone_db_user => 'keystone',
:keystone_db_password => 'secrete',
@ -253,6 +254,16 @@ describe 'cloud::identity' do
)
end
context 'without Swift' do
before :each do
params.merge!(:swift_enabled => false)
end
it 'should not configure swift endpoints and users' do
should_not contain_class('swift::keystone::auth')
should_not contain_class('swift::keystone::dispersion')
end
end
end
context 'on Debian platforms' do