Merge "Add memcached_servers for keystone authtoken"

This commit is contained in:
Jenkins 2016-07-01 10:20:46 +00:00 committed by Gerrit Code Review
commit 614de55077
3 changed files with 23 additions and 0 deletions

View File

@ -43,6 +43,11 @@
# (optional) URL used by the plugin to know where to authenticate the service user.
# Defaults to $::os_service_default.
#
# [*memcached_servers*]
# (optinal) a list of memcached server(s) to use for caching. If left
# undefined, tokens will instead be cached in-process.
# Defaults to $::os_service_default.
#
# [*host*]
# (optional) The aodh api bind address.
# Defaults to 0.0.0.0
@ -84,6 +89,7 @@ class aodh::api (
$keystone_password = false,
$keystone_auth_uri = false,
$keystone_auth_url = $::os_service_default,
$memcached_servers = $::os_service_default,
$keystone_project_domain_name = 'default',
$keystone_user_domain_name = 'default',
$keystone_auth_type = 'password',
@ -166,6 +172,7 @@ class aodh::api (
'keystone_authtoken/auth_type' : value => $keystone_auth_type;
'keystone_authtoken/username' : value => $keystone_user;
'keystone_authtoken/password' : value => $keystone_password, secret => true;
'keystone_authtoken/memcached_servers' : value => join(any2array($memcached_servers), ',');
'api/host' : value => $host;
'api/port' : value => $port;
}

View File

@ -0,0 +1,4 @@
---
fixes:
- Added the ability to manage the memcached servers
for keystone_authtoken in aodh::api

View File

@ -47,6 +47,7 @@ describe 'aodh::api' do
is_expected.to contain_aodh_config('keystone_authtoken/project_domain_name').with_value( params[:keystone_project_domain_name] )
is_expected.to contain_aodh_config('keystone_authtoken/user_domain_name').with_value( params[:keystone_user_domain_name] )
is_expected.to contain_aodh_config('keystone_authtoken/auth_type').with_value( params[:keystone_auth_type] )
is_expected.to contain_aodh_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('api/host').with_value( params[:host] )
is_expected.to contain_aodh_config('api/port').with_value( params[:port] )
end
@ -146,6 +147,17 @@ describe 'aodh::api' do
end
end
context "with memcached servers" do
before do
params.merge!({
:memcached_servers => '1.1.1.1:11211',
})
end
it 'configures auth_uri but deprecates old auth settings' do
is_expected.to contain_aodh_config('keystone_authtoken/memcached_servers').with_value('1.1.1.1:11211');
end
end
context "with deprecated keystone auth_uri" do
before do
params.merge!({