Merge "Add memcached_servers for keystone authtoken"

This commit is contained in:
Jenkins 2016-07-01 15:27:19 +00:00 committed by Gerrit Code Review
commit bf971fd64a
3 changed files with 26 additions and 3 deletions

View File

@ -171,6 +171,11 @@
# (optional) CA certificate file to use to verify connecting clients
# 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.
#
class cinder::api (
$keystone_password,
$keystone_enabled = true,
@ -207,6 +212,7 @@ class cinder::api (
$cert_file = $::os_service_default,
$key_file = $::os_service_default,
$ca_file = $::os_service_default,
$memcached_servers = $::os_service_default,
# DEPRECATED PARAMETERS
$validation_options = {},
) inherits cinder::params {
@ -325,9 +331,10 @@ class cinder::api (
}
cinder_config {
'keystone_authtoken/auth_uri' : value => $auth_uri;
'keystone_authtoken/identity_uri' : value => $identity_uri;
'keymgr/encryption_auth_url' : value => $keymgr_encryption_auth_url;
'keystone_authtoken/auth_uri': value => $auth_uri;
'keystone_authtoken/identity_uri': value => $identity_uri;
'keystone_authtoken/memcached_servers': value => join(any2array($memcached_servers), ',');
'keymgr/encryption_auth_url': value => $keymgr_encryption_auth_url;
}
if $keystone_enabled {

View File

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

View File

@ -64,6 +64,7 @@ describe 'cinder::api' do
is_expected.to contain_cinder_config('keystone_authtoken/admin_password').with(
:value => 'foo'
)
is_expected.to contain_cinder_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_password').with_value('<SERVICE DEFAULT>')
@ -294,6 +295,17 @@ describe 'cinder::api' do
end
end
describe "with memcached servers for keystone authtoken" do
let :params do
req_params.merge({
:memcached_servers => '1.1.1.1:11211',
})
end
it 'configures memcached servers' do
is_expected.to contain_cinder_config('keystone_authtoken/memcached_servers').with_value('1.1.1.1:11211')
end
end
describe 'with a custom osapi_max_limit' do
let :params do
req_params.merge({'osapi_max_limit' => '10000'})