Browse Source

Deprecate parameter and resource for api-paste.ini

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

Change-Id: Ifd191986b5854c331c3933b77e1b8c150fb94886
changes/38/725138/3
Takashi Kajinami 2 years ago
parent
commit
f8fd464e13
  1. 5
      lib/puppet/provider/ceilometer_api_paste_ini/ini_setting.rb
  2. 12
      manifests/config.pp
  3. 9
      releasenotes/notes/deprecate-api_paste_ini-c81c69d42848a263.yaml
  4. 13
      spec/classes/ceilometer_config_spec.rb

5
lib/puppet/provider/ceilometer_api_paste_ini/ini_setting.rb

@ -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

12
manifests/config.pp

@ -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.')
}
}

9
releasenotes/notes/deprecate-api_paste_ini-c81c69d42848a263.yaml

@ -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.

13
spec/classes/ceilometer_config_spec.rb

@ -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

Loading…
Cancel
Save