Browse Source

add parameter to specify if service on keystone should be configured

The added parameter should be deprecated in one of the next steps,
since there is no ceilometer api for several releases !

Change-Id: Ia579cf24a5e837487216329fe994cb030c1b3929
changes/64/758964/3
Benedikt Trefzer 2 years ago
parent
commit
5023a2c51f
  1. 7
      manifests/keystone/auth.pp
  2. 6
      releasenotes/notes/parameter-to-disable-keystone-service-741f019a021f5b4c.yaml
  3. 16
      spec/classes/ceilometer_keystone_auth_spec.rb

7
manifests/keystone/auth.pp

@ -19,6 +19,11 @@
# (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.
@ -82,6 +87,7 @@ class ceilometer::keystone::auth (
$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',
@ -95,6 +101,7 @@ class ceilometer::keystone::auth (
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,

6
releasenotes/notes/parameter-to-disable-keystone-service-741f019a021f5b4c.yaml

@ -0,0 +1,6 @@
---
features:
- |
Add parameter to ceilometer::keystone::auth to disable the creation
of keystone ceilometer service (used in catalog).
remark: parameter will be deprecated in wallaby cycle !

16
spec/classes/ceilometer_keystone_auth_spec.rb

@ -8,6 +8,7 @@ describe 'ceilometer::keystone::auth' do
:auth_name => 'ceilometer',
:service_name => 'ceilometer',
:configure_endpoint => true,
:configure_service => true,
:service_type => 'metering',
:region => 'RegionOne',
:tenant => 'services',
@ -167,6 +168,21 @@ describe 'ceilometer::keystone::auth' do
)}
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({

Loading…
Cancel
Save