(#19459) Accept an empty hash in create_resources() keys parameters#1500
(#19459) Accept an empty hash in create_resources() keys parameters#1500brunoleon wants to merge 1 commit intopuppetlabs:masterfrom brunoleon:fix/master/create_resources_empty_hash
Conversation
Without this patch, it is not possible to have the first hash passed to create_resources() having keys with no values, because merge() then fails assuming the variable is nil and not an empty hash. In practice this makes the function quite unusable to define a batch of resources with a default set of parameters (which you can define in another hash).
|
Hi @brunoleon, thanks for the patch. I've posted a question on the feature request in Redmine. |
|
@brunoleon Please re-open this pull request, or mention my name if you can't re-open it, and setting the empty hash as a value in the data file is an insufficient solution to this problem. I'm going to go ahead and close this pull request for the time being. Please re-open this pull request once the next actions are addressed, new information is available, or you have a question related to this pull request. We've become aware of difficulties re-opening pull requests, in the event you cannot please mention jeffmccune or adrienthebo with an @ sign in front and we'll re-open this pull request. Closing the pull request doesn't mean we don't consider this change valuable, just that there are things that need to be addressed before it can be merged. If you have any questions or concerns, please don't hesitate to ping us in #puppet-dev on irc.freenode.net. |
Without this patch, it is not possible to have the first hash passed to
create_resources() having keys with no values, because merge() then
fails assuming the variable is nil and not an empty hash.
In practice this makes the function quite unusable to define a batch of
resources with a default set of parameters (which you can define in
another hash).