From 7021e05beba1807f26f993d1ee01b8209ffb8feb Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 15 Aug 2021 00:25:40 +0900 Subject: [PATCH] Deprecate the ceilometer::policy class Ceilometer removed its API service a long ago and no longer uses policy rules. This change deprecates the invalid class to manage oslo.policy settings. Change-Id: Id2a7ebaf57b97083b8cc9eb32a8ecefcee39672f --- manifests/policy.pp | 13 +----- .../deprecate-policy-9c3c69c2f79777f8.yaml | 4 ++ spec/classes/ceilometer_policy_spec.rb | 42 ------------------- 3 files changed, 6 insertions(+), 53 deletions(-) create mode 100644 releasenotes/notes/deprecate-policy-9c3c69c2f79777f8.yaml delete mode 100644 spec/classes/ceilometer_policy_spec.rb diff --git a/manifests/policy.pp b/manifests/policy.pp index 82fc4c52..567b3369 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -1,5 +1,6 @@ # == Class: ceilometer::policy # +# DEPRECATED !! # Configure the ceilometer policies # # === Parameters @@ -31,16 +32,6 @@ class ceilometer::policy ( include ceilometer::deps include ceilometer::params - validate_legacy(Hash, 'validate_hash', $policies) - - Openstacklib::Policy::Base { - file_path => $policy_path, - file_user => 'root', - file_group => $::ceilometer::params::group, - } - - create_resources('openstacklib::policy::base', $policies) - - oslo::policy { 'ceilometer_config': policy_file => $policy_path } + warning('The ceilometer::policy class is deprecated and has no effect') } diff --git a/releasenotes/notes/deprecate-policy-9c3c69c2f79777f8.yaml b/releasenotes/notes/deprecate-policy-9c3c69c2f79777f8.yaml new file mode 100644 index 00000000..87dbb875 --- /dev/null +++ b/releasenotes/notes/deprecate-policy-9c3c69c2f79777f8.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - | + The ``ceilometer::policy`` class has been deprecated and now has no effect. diff --git a/spec/classes/ceilometer_policy_spec.rb b/spec/classes/ceilometer_policy_spec.rb deleted file mode 100644 index d49c922c..00000000 --- a/spec/classes/ceilometer_policy_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'spec_helper' - -describe 'ceilometer::policy' do - - shared_examples_for 'ceilometer policies' do - let :params do - { - :policy_path => '/etc/ceilometer/policy.json', - :policies => { - 'context_is_admin' => { - 'key' => 'context_is_admin', - 'value' => 'foo:bar' - } - } - } - end - - it 'set up the policies' do - is_expected.to contain_openstacklib__policy__base('context_is_admin').with({ - :key => 'context_is_admin', - :value => 'foo:bar', - :file_user => 'root', - :file_group => 'ceilometer', - }) - is_expected.to contain_oslo__policy('ceilometer_config').with( - :policy_file => '/etc/ceilometer/policy.json', - ) - end - end - - on_supported_os({ - :supported_os => OSDefaults.get_supported_os - }).each do |os,facts| - context "on #{os}" do - let (:facts) do - facts.merge!(OSDefaults.get_facts()) - end - - it_configures 'ceilometer policies' - end - end -end