Merge "Deprecate parameter and resource for api-paste.ini"
This commit is contained in:
commit
669d16f1f4
@ -3,6 +3,11 @@ Puppet::Type.type(:ceilometer_api_paste_ini).provide(
|
|||||||
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
|
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
|
||||||
) do
|
) do
|
||||||
|
|
||||||
|
def create
|
||||||
|
super
|
||||||
|
warning('ceilometer_api_paste_ini is deprecated, and will be removed in a future release')
|
||||||
|
end
|
||||||
|
|
||||||
def section
|
def section
|
||||||
resource[:name].split('/', 2).first
|
resource[:name].split('/', 2).first
|
||||||
end
|
end
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
# DEFAULT/bar:
|
# DEFAULT/bar:
|
||||||
# value: barValue
|
# value: barValue
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
# [*ceilometer_api_paste_ini*]
|
# [*ceilometer_api_paste_ini*]
|
||||||
# (optional) Allow configuration of /etc/ceilometer/api_paste.ini options.
|
# (optional) Allow configuration of /etc/ceilometer/api_paste.ini options.
|
||||||
#
|
#
|
||||||
@ -27,14 +29,18 @@
|
|||||||
#
|
#
|
||||||
class ceilometer::config (
|
class ceilometer::config (
|
||||||
$ceilometer_config = {},
|
$ceilometer_config = {},
|
||||||
$ceilometer_api_paste_ini = {},
|
# DEPRECATED PARAMETERS
|
||||||
|
$ceilometer_api_paste_ini = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ceilometer::deps
|
include ceilometer::deps
|
||||||
|
|
||||||
validate_legacy(Hash, 'validate_hash', $ceilometer_config)
|
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_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.')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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.
|
@ -23,18 +23,6 @@ describe 'ceilometer::config' do
|
|||||||
end
|
end
|
||||||
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({
|
on_supported_os({
|
||||||
:supported_os => OSDefaults.get_supported_os
|
:supported_os => OSDefaults.get_supported_os
|
||||||
}).each do |os,facts|
|
}).each do |os,facts|
|
||||||
@ -44,7 +32,6 @@ describe 'ceilometer::config' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it_configures 'ceilometer_config'
|
it_configures 'ceilometer_config'
|
||||||
it_configures 'ceilometer_api_paste_ini'
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user