Merge "Makes it possible to disable Cinder Service registration"

This commit is contained in:
Jenkins 2015-01-02 12:41:24 +00:00 committed by Gerrit Code Review
commit 86b58d2e52
2 changed files with 27 additions and 10 deletions

View File

@ -391,6 +391,10 @@
# (optional) Amount of time a token should remain valid (in seconds)
# Defaults to '3600' (1 hour)
#
# [*cinder_enabled*]
# (optional) Enable or not Cinder (Block Storage Service)
# Defaults to true
#
# [*trove_enabled*]
# (optional) Enable or not Trove (Database as a Service)
# Experimental feature.
@ -411,6 +415,7 @@
#
class cloud::identity (
$swift_enabled = true,
$cinder_enabled = true,
$trove_enabled = false,
$identity_roles_addons = ['SwiftOperator', 'ResellerAdmin'],
$keystone_db_host = '127.0.0.1',
@ -638,16 +643,18 @@ class cloud::identity (
password => $ks_neutron_password
}
class { 'cinder::keystone::auth':
admin_address => $ks_cinder_admin_host,
internal_address => $ks_cinder_internal_host,
public_address => $ks_cinder_public_host,
port => $ks_cinder_public_port,
public_protocol => $ks_cinder_public_proto,
admin_protocol => $ks_cinder_admin_proto,
internal_protocol => $ks_cinder_internal_proto,
region => $region,
password => $ks_cinder_password
if $cinder_enabled {
class { 'cinder::keystone::auth':
admin_address => $ks_cinder_admin_host,
internal_address => $ks_cinder_internal_host,
public_address => $ks_cinder_public_host,
port => $ks_cinder_public_port,
public_protocol => $ks_cinder_public_proto,
admin_protocol => $ks_cinder_admin_proto,
internal_protocol => $ks_cinder_internal_proto,
region => $region,
password => $ks_cinder_password
}
}
class { 'glance::keystone::auth':

View File

@ -25,6 +25,7 @@ describe 'cloud::identity' do
let :params do
{ :identity_roles_addons => ['SwiftOperator', 'ResellerAdmin'],
:swift_enabled => true,
:cinder_enabled => true,
:keystone_db_host => '10.0.0.1',
:keystone_db_user => 'keystone',
:keystone_db_password => 'secrete',
@ -327,6 +328,15 @@ describe 'cloud::identity' do
end
end
context 'without Cinder' do
before :each do
params.merge!(:cinder_enabled => false)
end
it 'should not configure cinder endpoints and users' do
is_expected.not_to contain_class('cinder::keystone::auth')
end
end
context 'with Trove' do
before :each do
params.merge!(:trove_enabled => true)