puppet-openstacklib/lib/puppet
Yanis Guenane 3b85306d04 Allow the use of an ensure_absent_val param
This commit aims to add a new feature for the ini_setting provider, this
feature aims to simulate the ensure => absent behavior when a specific
keyword is specified.

Currently a pattern we have is

if $myvar {
  keystone_config { 'SECTION/setting' : value => $myvar }
} else {
  keystone_config { 'SECTION/setting' : ensure => absent }
}

If one has dozens or hundreds of parameters to handle then it can easily
make the manifest hard to read.

The solution offer here would turn the above example in something like

Keystone_config {
  ensure_absent_val = '<SERVICE DEFAULT>' # It is the default
}

keystone_config { 'SECTION/setting' : value => $myvar }

If `$myvar` is '<SERVICE DEFAULT>' then it will act as if `ensure => absent` would
have been specified.

Also added new tests for openstack_config provider

Co-Authored-By: Denis Egorenko <degorenko@mirantis.com>

Change-Id: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
2015-08-18 09:46:19 +02:00
..
parser/functions Add os_database_connection function 2014-07-09 14:20:34 -04:00
provider Allow the use of an ensure_absent_val param 2015-08-18 09:46:19 +02:00
type Add a proxy inifile provider 2015-07-16 15:59:16 +02:00