#
# [*service_name*]
# (Optional) Name of the service.
-# Defaults to value of auth_name.
+# Defaults to 'ceilometer'.
#
# [*service_type*]
# (Optional) Type of service. Optional.
$auth_name = 'ceilometer',
$configure_user = true,
$configure_user_role = true,
- $service_name = undef,
+ $service_name = 'ceilometer',
$service_type = 'metering',
$service_description = 'Openstack Metering Service',
$region = 'RegionOne',
validate_string($password)
- $service_name_real = pick($service_name, $auth_name)
-
- ::keystone::resource::service_identity { $auth_name:
+ ::keystone::resource::service_identity { 'ceilometer':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_type => $service_type,
service_description => $service_description,
- service_name => $service_name_real,
+ service_name => $service_name,
region => $region,
+ auth_name => $auth_name,
password => $password,
email => $email,
tenant => $tenant,
{
:email => 'ceilometer@localhost',
:auth_name => 'ceilometer',
+ :service_name => 'ceilometer',
:configure_endpoint => true,
:service_type => 'metering',
:region => 'RegionOne',
end
it 'configures ceilometer service' do
- is_expected.to contain_keystone_service("#{default_params[:auth_name]}::#{default_params[:service_type]}").with(
+ is_expected.to contain_keystone_service("#{default_params[:service_name]}::#{default_params[:service_type]}").with(
:ensure => 'present',
:description => 'Openstack Metering Service'
)
end
it 'configure ceilometer endpoints' do
- is_expected.to contain_keystone_endpoint("#{default_params[:region]}/#{default_params[:auth_name]}::#{default_params[:service_type]}").with(
+ is_expected.to contain_keystone_endpoint("#{default_params[:region]}/#{default_params[:service_name]}::#{default_params[:service_type]}").with(
:ensure => 'present',
:public_url => default_params[:public_url],
:admin_url => default_params[:admin_url],
:public_url => 'https://public.host:443/ceilometer_pub',
:admin_url => 'https://admin.host/ceilometer_adm',
:internal_url => 'http://internal.host:80/ceilometer_int',
+ :service_name => 'bubbles',
})
end
end
it 'configures ceilometer service' do
- is_expected.to contain_keystone_service("#{params[:auth_name]}::#{params[:service_type]}").with(
+ is_expected.to contain_keystone_service("#{params[:service_name]}::#{params[:service_type]}").with(
:ensure => 'present',
:description => 'Openstack Metering Service'
)
end
it 'configure ceilometer endpoints' do
- is_expected.to contain_keystone_endpoint("#{params[:region]}/#{params[:auth_name]}::#{params[:service_type]}").with(
+ is_expected.to contain_keystone_endpoint("#{params[:region]}/#{params[:service_name]}::#{params[:service_type]}").with(
:ensure => 'present',
:public_url => params[:public_url],
:admin_url => params[:admin_url],
before do
params.delete!(:configure_endpoint)
it 'does not configure ceilometer endpoints' do
- is_expected.to_not contain_keystone_endpoint("#{params[:region]}/#{params[:auth_name]}::#{params[:service_type]}")
+ is_expected.to_not contain_keystone_endpoint("#{params[:region]}/#{params[:service_name]}::#{params[:service_type]}")
end
end
end