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
This commit is contained in:
parent
d840e19f98
commit
7021e05beb
@ -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')
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``ceilometer::policy`` class has been deprecated and now has no effect.
|
@ -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
|
Loading…
Reference in New Issue
Block a user