identity: disable trove by default

Trove (Database as a service) is still experimental and should be
disabled by default to avoid error with current default configuration.

This patchs does it by adding a new parameter trove_enabled (False by
default) and only create Keystone endpoint if this parameter is at True.

It also avoids to see the Database panel in Horizon by default.
This commit is contained in:
Emilien Macchi
2014-09-18 22:27:21 -04:00
parent e322f60411
commit 7a073e01bc
2 changed files with 39 additions and 22 deletions

View File

@@ -350,8 +350,14 @@
# (optional) Amount of time a token should remain valid (in seconds) # (optional) Amount of time a token should remain valid (in seconds)
# Defaults to '3600' (1 hour) # Defaults to '3600' (1 hour)
# #
# [*trove_enabled*]
# (optional) Enable or not Trove (Database as a Service)
# Experimental feature.
# Defaults to false
#
class cloud::identity ( class cloud::identity (
$swift_enabled = true, $swift_enabled = true,
$trove_enabled = false,
$identity_roles_addons = ['SwiftOperator', 'ResellerAdmin'], $identity_roles_addons = ['SwiftOperator', 'ResellerAdmin'],
$keystone_db_host = '127.0.0.1', $keystone_db_host = '127.0.0.1',
$keystone_db_user = 'keystone', $keystone_db_user = 'keystone',
@@ -623,6 +629,7 @@ class cloud::identity (
password => $ks_heat_password password => $ks_heat_password
} }
if $trove_enabled {
class {'trove::keystone::auth': class {'trove::keystone::auth':
admin_address => $ks_trove_admin_host, admin_address => $ks_trove_admin_host,
internal_address => $ks_trove_internal_host, internal_address => $ks_trove_internal_host,
@@ -634,6 +641,7 @@ class cloud::identity (
region => $region, region => $region,
password => $ks_trove_password password => $ks_trove_password
} }
}
# Purge expored tokens every days at midnight # Purge expored tokens every days at midnight
class { 'keystone::cron::token_flush': } class { 'keystone::cron::token_flush': }

View File

@@ -211,18 +211,8 @@ describe 'cloud::identity' do
) )
end end
it 'configure trove endpoints' do it 'should not configure trove endpoint by default' do
should contain_class('trove::keystone::auth').with( should_not contain_class('trove::keystone::auth')
:admin_address => '10.0.0.1',
:internal_address => '10.0.0.1',
:password => 'secrete',
:port => '8779',
:public_address => '10.0.0.1',
:public_protocol => 'https',
:admin_protocol => 'https',
:internal_protocol => 'https',
:region => 'BigCloud'
)
end end
it 'configure nova endpoints' do it 'configure nova endpoints' do
@@ -335,6 +325,25 @@ describe 'cloud::identity' do
end end
end end
context 'with Trove' do
before :each do
params.merge!(:trove_enabled => true)
end
it 'configure trove endpoints' do
should contain_class('trove::keystone::auth').with(
:admin_address => '10.0.0.1',
:internal_address => '10.0.0.1',
:password => 'secrete',
:port => '8779',
:public_address => '10.0.0.1',
:public_protocol => 'https',
:admin_protocol => 'https',
:internal_protocol => 'https',
:region => 'BigCloud'
)
end
end
end end
context 'on Debian platforms' do context 'on Debian platforms' do