4 Commits

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

The same apply for trove_conductor_config, trove_guestagent_config and
trove_taskmanager_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 :

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

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

That means that all the current :

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

can be removed in favor of :

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

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

Change-Id: I44472b107c951d22932c533031f68aa67a5f2e18
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
2015-08-19 11:21:42 +02:00
Sebastien Badia
4aa993d435 Fix spec tests for RSpec 3.x and Puppet 4.x
Rix resource array, according[1].
[1]https://github.com/puppetlabs/puppet/blob/3.7.5/lib/puppet/resource.rb#L446-L453

This patch also update RSpec 3.x matcher in order to remove deprecation
warnings (in units).

Change-Id: I562072a2169ada204616b86e0033ac4905579ed6
Closes-bug: #1447620
2015-04-28 03:33:03 +02:00
Sylvain Baubeau
8d37ba9451 Add trove_datastore and trove_datastore_version types
Change-Id: If739b4b26ef98ae9ba09affd4f2eeef4ad1b55fd
2014-08-11 12:03:44 +02:00
Sebastien Badia
ddee700cab type/provider: Add unit tests for trove_config provider
This PR is linked to https://github.com/enovance/puppet-trove/pull/4
2014-07-02 11:56:44 +02:00