# (Optional) Should Ceilometer endpoint be configured.
# Defaults to true.
#
+# [*configure_service*]
+# (Optional) Whether to create the service.
+# Default to True
+# Remark: will be deprecated in wallaby cycle
+#
# [*configure_user*]
# (Optional) Should Ceilometer service user be configured?
# Defaults to true.
$region = 'RegionOne',
$tenant = 'services',
$configure_endpoint = true,
+ Boolean $configure_service = true,
$public_url = 'http://127.0.0.1:8777',
$admin_url = 'http://127.0.0.1:8777',
$internal_url = 'http://127.0.0.1:8777',
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
+ configure_service => $configure_service,
service_type => $service_type,
service_description => $service_description,
service_name => $service_name,
:auth_name => 'ceilometer',
:service_name => 'ceilometer',
:configure_endpoint => true,
+ :configure_service => true,
:service_type => 'metering',
:region => 'RegionOne',
:tenant => 'services',
)}
end
+ context 'when disabling service and endpoint configuration' do
+ before do
+ params.merge!(
+ :configure_service => false,
+ :configure_endpoint => false
+ )
+ end
+
+ it { is_expected.to_not contain_keystone_service('ceilometer::metering') }
+ it { is_expected.to_not contain_keystone_endpoint("#{default_params[:region]}/#{default_params[:service_name]}::#{default_params[:service_type]}")}
+
+ it { is_expected.to contain_keystone_user('ceilometer') }
+ it { is_expected.to contain_keystone_user_role('ceilometer@services') }
+ end
+
end
on_supported_os({