New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle backwards compatibility with force_new_section_creation #288
Conversation
0c39024
to
1159317
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried running the module with the changes you have mentioned. I found that resource.respond_to?(:force_new_section_creation) always returns False. Hence the code always moving to the else part and thus always calls the create function.
Is there an alternative function to use to see if a param is on a type? |
Prior to the introduction of this new parameter in the ini_setting type, a user may have had their own custom type which implemented the required parameters. The introduction of this new type would break anyone who was not inheriting from the provide ini_setting type. This change adds a check before looking for this option to allow those users to continue to work. If the force_new_section_creation is not defined on the type, the previous expected functionality of automatic creation of the section will occur. Related-Bug: https://bugs.launchpad.net/puppet-openstacklib/+bug/1778247
@hsitin, @david22swan please retest this version, I think this will work correctly now |
Passed on adhoc |
This reverts commit f8648b2. puppetlabs/puppetlabs-inifile#288 has been merged to allow for backwards compatibility. Change-Id: I52673b6a8524ce0fe33df6c08f1aa6e058524b51 Closes-Bug: LP#1778247
Hey! @hsitin I am going to cut a release of inifile, just want to ensure that you are happy enough that the changes have resolved the issue you were seeing regarding resource.respond_to?(:force_new_section_creation) always returning False. Many Thanks |
Prior to the introduction of this new parameter in the ini_setting type,
a user may have had their own custom type which implemented the required
parameters. The introduction of this new type would break anyone who was
not inheriting from the provide ini_setting type. This change adds a
check before looking for this option to allow those users to continue to
work. If the force_new_section_creation is not defined on the type, the
previous expected functionality of automatic creation of the section
will occur.
Related-Bug: https://bugs.launchpad.net/puppet-openstacklib/+bug/1778247