Commit Graph

4 Commits

Author SHA1 Message Date
Yanis Guenane
8db8143c89 Reflect provider change in puppet-openstacklib
With the creation of the new openstack_config provider, some processing
that was done in glance_api_config has been centralized in
openstack_config.

The same changes apply for glance_registry_config and
glance_cache_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 :

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

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

That means that all the current :

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

can be removed in favor of :

glance_api_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 :

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

Change-Id: I3bbdf63d1b9b5a2daba30fd4ba897db703f979ae
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
2015-08-19 12:42:38 +02:00
Dan Bode
7cbd4bbf8c changes required to support purging
In order for the ini file type to support purging,
the file path must be accessible on the class instance.

This patch was made to test some new functionality being added
to the inifile type
  https://github.com/cprice-puppet/puppetlabs-inifile/pull/25

It does effect backwards compat of this native type so its ok
to go ahead and merge.
2013-03-04 16:03:58 -08:00
Dan Bode
ee38ea961e Properly load parent provider from another module
As recommended by lak.
2012-10-10 12:59:45 -07:00
Dan Bode
db7de69bd5 Convert to ini file management
- Add native types to manage all existing ini files
- remove all unused templates
- convert all concat with ini_setting resources
- remove all concat code
2012-10-03 22:04:00 -07:00