Currently the file_path sections, of the ini_setting.rb's and
openstackconfig.rb's, are not being passed in the best way. When trying
to use ini_settings it throws an error stating "ini_settings only
support collecting instances when a file path is hard coded". Passing
the variables with the 'self.' alleviates this.
This is needed in order to be able to use the purge_config option.
*Added backwards compatability for older versions of inifile
Change-Id: I9b09bf574208af5c044508129e41ec7420ac1f82
With the creation of the new openstack_config provider, some processing
that was done in neutron_config has been centralized in
openstack_config.
The same logic applies for all the neutron resources that edit a
ini-like configuration file.
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 :
neutron_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual
neutron_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent
That means that all the current :
if $myvar {
neutron_config { 'DEFAULT/foo' : value => $myvar }
} else {
neutron_config { 'DEFAULT/foo' : ensure => absent }
}
can be removed in favor of :
neutron_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 :
neutron_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }
Change-Id: I3f972ecbde3719fe71a82a64f894d41f6ea7e842
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218