Deprecate parameter and resource for api-paste.ini

... api-paste.ini is no longer used since ceilometer-api was removed.

Change-Id: Ifd191986b5854c331c3933b77e1b8c150fb94886
This commit is contained in:
Takashi Kajinami 2020-05-04 03:33:07 +09:00
parent f6563cb4de
commit f8fd464e13
4 changed files with 23 additions and 16 deletions

View File

@ -3,6 +3,11 @@ Puppet::Type.type(:ceilometer_api_paste_ini).provide(
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def create
super
warning('ceilometer_api_paste_ini is deprecated, and will be removed in a future release')
end
def section
resource[:name].split('/', 2).first
end

View File

@ -19,6 +19,8 @@
# DEFAULT/bar:
# value: barValue
#
# DEPRECATED PARAMETERS
#
# [*ceilometer_api_paste_ini*]
# (optional) Allow configuration of /etc/ceilometer/api_paste.ini options.
#
@ -27,14 +29,18 @@
#
class ceilometer::config (
$ceilometer_config = {},
$ceilometer_api_paste_ini = {},
# DEPRECATED PARAMETERS
$ceilometer_api_paste_ini = undef,
) {
include ceilometer::deps
validate_legacy(Hash, 'validate_hash', $ceilometer_config)
validate_legacy(Hash, 'validate_hash', $ceilometer_api_paste_ini)
create_resources('ceilometer_config', $ceilometer_config)
create_resources('ceilometer_api_paste_ini', $ceilometer_api_paste_ini)
if $ceilometer_api_paste_ini != undef {
warning('ceilometer_api_paste_ini is deprecated and has no effect.')
}
}

View File

@ -0,0 +1,9 @@
---
deprecations:
- |
The ``ceilometer::config::api_paste_ini`` parameter has been deprecated and
has not effect.
- |
The ``ceilometer_api_paste_ini`` resource has been deprecated and will be
removed in a future release.

View File

@ -23,18 +23,6 @@ describe 'ceilometer::config' do
end
end
shared_examples_for 'ceilometer_api_paste_ini' do
let :params do
{ :ceilometer_api_paste_ini => config_hash }
end
it 'configures arbitrary ceilometer-api-paste-ini configurations' do
is_expected.to contain_ceilometer_api_paste_ini('DEFAULT/foo').with_value('fooValue')
is_expected.to contain_ceilometer_api_paste_ini('DEFAULT/bar').with_value('barValue')
is_expected.to contain_ceilometer_api_paste_ini('DEFAULT/baz').with_ensure('absent')
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
@ -44,7 +32,6 @@ describe 'ceilometer::config' do
end
it_configures 'ceilometer_config'
it_configures 'ceilometer_api_paste_ini'
end
end
end