Issue #9850 has been updated by Jacob Helwig.

Description updated
Status changed from Unreviewed to Needs More Information

Small bit of clarification between parameters, and properties:
* Properties are things that can be queried from the state of the system, and 
are generally things that make up parts of the resource itself.
* Parameters are meta-information about the resource, and aren't queried from 
the system itself.  They're used to tell Puppet information it needs to be able 
to manage the resource.

>From the name of the parameter you provided as an example, it looks like it 
>should actually be a property (but this is just a guess).

Just to clarify what the bug report is about: The bug being reported is that 
parameters, and properties do not behave the same when `:array_matching => 
:all` is specified, with regards to a single value being specified in the 
manifest (parameters just pass the value, while properties wrap it in an array).

Is that an accurate summary?
----------------------------------------
Bug #9850: Arrays changed to strings in custom type parameters
https://projects.puppetlabs.com/issues/9850

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


I'm currently configuring a puppet setup. Puppetmaster and puppet client are 
both version 2.7.3, and ruby version 2.8.7 patch level 352
I was creating a custom type, and had an element as a parameter. When that 
parameter had a single element, puppet sent it as a string, rather than as an 
array.
If I changed it from a parameter to a property, it showed up correctly on the 
client as an array.

Excerpt from type (nothing special here):
    newparam(:allowed_ips, :array_matching => :all) do 
      defaultto :absent
    end

In the provider, it then would be an array only if more than one element was 
specified in the manifest.
Let me know what other details you need.


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