]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commit
Reflect provider change in puppet-openstacklib
authorYanis Guenane <yguenane@redhat.com>
Thu, 6 Aug 2015 11:05:21 +0000 (13:05 +0200)
committerYanis Guenane <yguenane@redhat.com>
Wed, 19 Aug 2015 08:37:41 +0000 (10:37 +0200)
commit05c5ec1605769579d6f6caeb91cd850da895a730
tree38d0f527e430a6ca6be8b0be7ad76e8af5f016bf
parent212630d4f20ef897ba43006408ae7fd90da91a3f
Reflect provider change in puppet-openstacklib

With the creation of the new openstack_config provider, some processing
that was done in ceilometer_config has been centralized in
openstack_config.

Impacted methods are :

  * section
  * setting
  * separator

Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.

The use case is the following :

ceilometer_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual

ceilometer_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent

That means that all the current :

if $myvar {
  ceilometer_config { 'DEFAULT/foo' : value => $myvar }
} else {
  ceilometer_config { 'DEFAULT/foo' : ensure => absent }
}

can be removed in favor of :

ceilometer_config { 'DEFAULT/foo' : value => $myvar }

If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :

ceilometer_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }

Change-Id: Ia46f8ea1228caca85d6fe431922fa8229f4c4ade
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
README.md
lib/puppet/provider/ceilometer_config/ini_setting.rb
lib/puppet/type/ceilometer_config.rb
spec/unit/provider/ceilometer_config/ini_setting_spec.rb