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)
# Defaults to '3600' (1 hour)
#
# [*trove_enabled*]
# (optional) Enable or not Trove (Database as a Service)
# Experimental feature.
# Defaults to false
#
class cloud::identity (
$swift_enabled = true,
$trove_enabled = false,
$identity_roles_addons = ['SwiftOperator', 'ResellerAdmin'],
$keystone_db_host = '127.0.0.1',
$keystone_db_user = 'keystone',
@@ -623,16 +629,18 @@ class cloud::identity (
password => $ks_heat_password
}
class {'trove::keystone::auth':
admin_address => $ks_trove_admin_host,
internal_address => $ks_trove_internal_host,
public_address => $ks_trove_public_host,
public_protocol => $ks_trove_public_proto,
admin_protocol => $ks_trove_admin_proto,
internal_protocol => $ks_trove_internal_proto,
port => $ks_trove_public_port,
region => $region,
password => $ks_trove_password
if $trove_enabled {
class {'trove::keystone::auth':
admin_address => $ks_trove_admin_host,
internal_address => $ks_trove_internal_host,
public_address => $ks_trove_public_host,
public_protocol => $ks_trove_public_proto,
admin_protocol => $ks_trove_admin_proto,
internal_protocol => $ks_trove_internal_proto,
port => $ks_trove_public_port,
region => $region,
password => $ks_trove_password
}
}
# Purge expored tokens every days at midnight

View File

@@ -211,18 +211,8 @@ describe 'cloud::identity' do
)
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'
)
it 'should not configure trove endpoint by default' do
should_not contain_class('trove::keystone::auth')
end
it 'configure nova endpoints' do
@@ -335,6 +325,25 @@ describe 'cloud::identity' do
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
context 'on Debian platforms' do