Browse Source

Add memcached_servers for keystone authtoken

This change adds the abiltity to manage the memcached servers for the
keystone authtoken configuration in ceilometer::api

Change-Id: I5fe1ec35630a67fe08b5c7b475593c34044110e8
changes/25/336125/1
Alex Schultz 6 years ago
parent
commit
1ae57a6e78
  1. 7
      manifests/api.pp
  2. 4
      releasenotes/notes/keystone-authtoken-memcached-ab13c488a438804d.yaml
  3. 11
      spec/classes/ceilometer_api_spec.rb

7
manifests/api.pp

@ -27,6 +27,11 @@
# [*keystone_password*]
# (Required) Password to authenticate with.
#
# [*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.
#
# [*auth_uri*]
# (Optional) Public Identity API endpoint.
# Defaults to 'http://127.0.0.1:5000/'.
@ -77,6 +82,7 @@ class ceilometer::api (
$keystone_user = 'ceilometer',
$keystone_tenant = 'services',
$keystone_password = false,
$memcached_servers = $::os_service_default,
$auth_uri = 'http://127.0.0.1:5000/',
$identity_uri = 'http://127.0.0.1:35357/',
$host = '0.0.0.0',
@ -145,6 +151,7 @@ class ceilometer::api (
'keystone_authtoken/admin_tenant_name' : value => $keystone_tenant;
'keystone_authtoken/admin_user' : value => $keystone_user;
'keystone_authtoken/admin_password' : value => $keystone_password, secret => true;
'keystone_authtoken/memcached_servers' : value => join(any2array($memcached_servers), ',');
'api/host' : value => $host;
'api/port' : value => $port;
}

4
releasenotes/notes/keystone-authtoken-memcached-ab13c488a438804d.yaml

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

11
spec/classes/ceilometer_api_spec.rb

@ -44,6 +44,7 @@ describe 'ceilometer::api' do
is_expected.to contain_ceilometer_config('keystone_authtoken/admin_password').with_value( params[:keystone_password] ).with_secret(true)
is_expected.to contain_ceilometer_config('keystone_authtoken/auth_uri').with_value("http://127.0.0.1:5000/")
is_expected.to contain_ceilometer_config('keystone_authtoken/identity_uri').with_value("http://127.0.0.1:35357/")
is_expected.to contain_ceilometer_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('api/host').with_value( params[:host] )
is_expected.to contain_ceilometer_config('api/port').with_value( params[:port] )
is_expected.to contain_ceilometer_config('api/workers').with_value('<SERVICE DEFAULT>')
@ -69,6 +70,16 @@ describe 'ceilometer::api' do
end
end
context 'with memcached servers' do
before do
params.merge!({ :memcached_servers => '1.1.1.1:11211', })
end
it 'configures ceilometer-api service' do
is_expected.to contain_ceilometer_config('keystone_authtoken/memcached_servers').with_value('1.1.1.1:11211')
end
end
context 'with disabled service managing' do
before do
params.merge!({

Loading…
Cancel
Save