diff --git a/lib/puppet/provider/ceilometer_api_paste_ini/ini_setting.rb b/lib/puppet/provider/ceilometer_api_paste_ini/ini_setting.rb index 2a08cb4f..af0585f7 100644 --- a/lib/puppet/provider/ceilometer_api_paste_ini/ini_setting.rb +++ b/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 diff --git a/manifests/config.pp b/manifests/config.pp index f4587bee..8016893d 100644 --- a/manifests/config.pp +++ b/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.') + } + } diff --git a/releasenotes/notes/deprecate-api_paste_ini-c81c69d42848a263.yaml b/releasenotes/notes/deprecate-api_paste_ini-c81c69d42848a263.yaml new file mode 100644 index 00000000..ee185c39 --- /dev/null +++ b/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. diff --git a/spec/classes/ceilometer_config_spec.rb b/spec/classes/ceilometer_config_spec.rb index de427f2f..5ef7170c 100644 --- a/spec/classes/ceilometer_config_spec.rb +++ b/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