Issue #5661 has been updated by Jesse Wolfe.

Status changed from Ready For Testing to Available In Testing Branch
Target version changed from Statler to 2.6.x

While I'd be happier if this code included a unit test, it's obviously correct 
in a such a way that I'm merging it in.

and since this is an internal-correctness issue, I'm merging it to the 2.6 
series.

Available in `2.6.next` as of commit:626aae793bae373d277c0ac07b07c3bacf462785

----------------------------------------
Bug #5661: Creating type instances is broken when type uses composite keys
https://projects.puppetlabs.com/issues/5661

Author: Stefan Schulte
Status: Available In Testing Branch
Priority: Normal
Assignee: Stefan Schulte
Category: 
Target version: 2.6.x
Affected Puppet version: 2.6.0
Keywords: 
Branch: https://github.com/stschulte/puppet/tree/ticket/2.6.x/5661


When you create a resourcetype with more than one namevar creating an instance 
of your type will lead to an error:

Instance creation:
    ressource =  @class.new(:title => 'telnet:tcp', :name => 'telnet', 
:protocol => :tcp, :number => '23')

Error:
    Resource type port does not support parameter false

with port beeing a resourcetype with name and protocal as a namevar. The reason 
is that puppet treats the parameter :name special. When puppet tries to set the 
name with `resource[:name] = value`, it substitutes `:name` with whatever the 
namevar is. Because `namevar` returns false when we have more than one 
key_attribute, puppet tries to set a parameter "false" which does not exists.


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