$keystone_user = 'ceilometer',
$keystone_tenant = 'services',
$keystone_password = false,
+ $keystone_auth_uri = false,
) {
include ceilometer::params
}
}
+ if $keystone_auth_uri {
+ ceilometer_config {
+ 'keystone_authtoken/auth_uri': value => $keystone_auth_uri;
+ }
+ } else {
+ ceilometer_config {
+ 'keystone_authtoken/auth_uri': value => "${keystone_protocol}://${keystone_host}:5000/";
+ }
+ }
+
}
should contain_ceilometer_config('keystone_authtoken/admin_user').with_value( params[:keystone_user] )
should contain_ceilometer_config('keystone_authtoken/admin_password').with_value( params[:keystone_password] )
should contain_ceilometer_config('keystone_authtoken/auth_admin_prefix').with_ensure('absent')
+ should contain_ceilometer_config('keystone_authtoken/auth_uri').with_value( params[:keystone_protocol] + "://" + params[:keystone_host] + ":5000/" )
end
context 'when specifying keystone_auth_admin_prefix' do
it_configures 'ceilometer-api'
end
+
+ describe 'with custom auth_uri' do
+ let :facts do
+ { :osfamily => 'RedHat' }
+ end
+ before do
+ params.merge!({
+ :keystone_auth_uri => 'https://foo.bar:1234/',
+ })
+ end
+ it 'should configure custom auth_uri correctly' do
+ should contain_ceilometer_config('keystone_authtoken/auth_uri').with_value( 'https://foo.bar:1234/' )
+ end
+ end
+
end