# [*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/'.
$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',
'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;
}
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>')
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!({