Issue #4151 has been updated by James Turnbull.

Status changed from Unreviewed to Accepted
Target version set to Statler


----------------------------------------
Bug #4151: defined function should not return true for unrealized virtual 
resources
http://projects.puppetlabs.com/issues/4151

Author: Jeff McCune
Status: Accepted
Priority: Normal
Assigned to: 
Category: functions
Target version: Statler
Affected version: 0.25.5
Keywords: virtual resource defined realized realize function
Branch: 


Description:
The defined() function currently returns true when given a reference to a 
resource declared virtually even if the resource has not been realized.

Expected Behavior:
The defined() function should only return true if a resource has been realized.

Actual Behavior:
defined() returns true for unrealized virtual resources

Steps to reproduce:
Acceptance test git branch URI will be added to the ticket once an issue number 
is available.

    @notify { "hello": }
if (defined(Notify["hello"])) { $requires = [ Notify["hello"] ] }
notify { "goodbye": require => $requires }

The expected result of this puppet manifest snippet is that $requires is unset 
and therefore Notify["goodbye"] has no relationship.


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