Update default paste_config on Red Hat systems

Use same default for paste_config on Red Hat & Ubuntu systems
RDO packaging is now using keystone-paste.ini file in /etc/keystone,
like Ubuntu. So there is no need anymore to make a distinction.

Change-Id: I3987c254bdafe9fb23266da2fff2e21d1cd0cec3
This commit is contained in:
Emilien Macchi 2016-02-15 15:17:47 -05:00
parent a6938982f1
commit 363d63ac3d
3 changed files with 9 additions and 53 deletions

View File

@ -394,8 +394,7 @@
# [*paste_config*]
# (optional) Name of the paste configuration file that defines the
# available pipelines. (string value)
# Defaults to '/usr/share/keystone/keystone-dist-paste.ini' on RedHat and
# undef on other platforms.
# Defaults to $::os_service_default
#
# [*max_token_size*]
# (optional) maximum allowable Keystone token size
@ -584,7 +583,7 @@ class keystone(
$validate_insecure = false,
$validate_auth_url = false,
$validate_cacert = undef,
$paste_config = $::keystone::params::paste_config,
$paste_config = $::os_service_default,
$service_provider = $::keystone::params::service_provider,
$service_name = $::keystone::params::service_name,
$max_token_size = $::os_service_default,
@ -689,6 +688,7 @@ class keystone(
'DEFAULT/admin_bind_host': value => $admin_bind_host;
'DEFAULT/public_port': value => $public_port;
'DEFAULT/admin_port': value => $admin_port;
'paste_deploy/config_file': value => $paste_config;
}
# Endpoint configuration
@ -934,16 +934,6 @@ class keystone(
Class['::keystone::db::sync'] ~> Service[$service_name]
}
if $paste_config {
keystone_config {
'paste_deploy/config_file': value => $paste_config;
}
} else {
keystone_config {
'paste_deploy/config_file': ensure => absent;
}
}
# Fernet tokens support
if $enable_fernet_setup {
validate_string($fernet_key_repository)

View File

@ -12,7 +12,6 @@ class keystone::params {
$keystone_wsgi_script_source = '/usr/share/keystone/wsgi.py'
$python_memcache_package_name = 'python-memcache'
$sqlite_package_name = 'python-pysqlite2'
$paste_config = undef
$pymysql_package_name = 'python-pymysql'
$mellon_package_name = 'libapache2-mod-auth-mellon'
case $::operatingsystem {
@ -32,7 +31,6 @@ class keystone::params {
$sqlite_package_name = undef
$service_provider = undef
$keystone_wsgi_script_source = '/usr/share/keystone/keystone.wsgi'
$paste_config = '/usr/share/keystone/keystone-dist-paste.ini'
$pymysql_package_name = undef
$mellon_package_name = 'mod_auth_mellon'
}

View File

@ -64,6 +64,7 @@ describe 'keystone' do
'rabbit_heartbeat_rate' => '<SERVICE DEFAULT>',
'admin_workers' => 20,
'public_workers' => 20,
'paste_config' => '<SERVICE DEFAULT>',
'sync_db' => true,
}
@ -107,6 +108,7 @@ describe 'keystone' do
'rabbit_heartbeat_rate' => '10',
'rabbit_ha_queues' => true,
'default_domain' => 'other_domain',
'paste_config' => '/usr/share/keystone/keystone-paste.ini',
'using_domain_config' => false
}
@ -199,6 +201,10 @@ describe 'keystone' do
is_expected.to contain_keystone_config('token/revoke_by_id').with_value(param_hash['revoke_by_id'])
end
it 'should contain default paste_config' do
is_expected.to contain_keystone_config('paste_deploy/config_file').with_value(param_hash['paste_config'])
end
it 'should ensure proper setting of admin_endpoint and public_endpoint' do
if param_hash['admin_endpoint']
is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value(param_hash['admin_endpoint'])
@ -887,44 +893,6 @@ describe 'keystone' do
end
end
describe 'when configuring paste_deploy' do
describe 'with default paste config on Debian' do
let :params do
default_params
end
it { is_expected.to contain_keystone_config('paste_deploy/config_file').with_ensure('absent') }
end
describe 'with default paste config on RedHat' do
let :facts do
@default_facts.merge(global_facts.merge({
:osfamily => 'RedHat',
:operatingsystemrelease => '6.0'
}))
end
let :params do
default_params
end
it { is_expected.to contain_keystone_config('paste_deploy/config_file').with_value(
'/usr/share/keystone/keystone-dist-paste.ini'
)}
end
describe 'with overrided paste_deploy' do
let :params do
default_params.merge({
'paste_config' => '/usr/share/keystone/keystone-paste.ini',
})
end
it { is_expected.to contain_keystone_config('paste_deploy/config_file').with_value(
'/usr/share/keystone/keystone-paste.ini'
)}
end
end
shared_examples_for "when configuring default domain" do
describe 'with default domain and eventlet service is managed and enabled' do
let :params do