Issue #17775 has been updated by eric sorenson.

Status changed from Unreviewed to Needs More Information
Assignee set to Dan Bode

Dan, does Stefan's update at http://projects.puppetlabs.com/issues/17775#note-2 
answer your concerns about this behaviour?

It seems to make sense but I can see your point that it feels a little magical; 
any attribute that happens to have`absent`  as a value will be omitted. What 
was the resource type you were working with when you came across this?

I've put this ticket's status into "Needs more Information" and assigned it to 
you. Please either (a) update it with the information I've requested and 
re-assign it to me if you need more help, or (b) change the status to "Closed" 
if you were able to resolve the issue on your own. 
----------------------------------------
Bug #17775: puppet resource removes any properties from its output whose value 
is absent
https://projects.puppetlabs.com/issues/17775#change-79717

Author: Dan Bode
Status: Needs More Information
Priority: Normal
Assignee: Dan Bode
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


the following code from Puppet::Resource

<pre>
380   def prune_parameters(options = {})
381     properties = resource_type.properties.map(&:name)
382 
383     dup.collect do |attribute, value|
384       if value.to_s.empty? or Array(value).empty?
385         delete(attribute)
386       elsif value.to_s == "absent" and attribute.to_s != "ensure"
387         delete(attribute)
388       end
</pre>

removes any attributes from the output of the puppet resource command whose 
value is absent. I noticed it while debugging a missing attribute (whose value 
happened to be absent)

I am a little confused by what that code is intended to do. Is it possible that 
!= should be an == ?


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to