Hi Patrick,

On Sun, Aug 22, 2010 at 9:01 PM, Patrick <kc7...@gmail.com> wrote:

> I'm making a cups manager type and I'm having trouble figuring out where I
> should parameters and where I should use properties. The file is at
> http://github.com/kc7zzv/puppet-cups_printer/blob/master/lib/puppet/type/cups_printer.rb
>  .
>
> I was accidentally using "newproperty"
>

properties are attributes that can be queried/synchronized. This expects
getter/setters to be created.

Think about Mode or Owner for the file resource. If a file exists, we can
query the current state of these attributes, and possibly sync it.


> and "newparameter"
>

newparam - this is just data that can be used by the provider.

Like recurse or force for the file resource (these are not things that are
synced)

interchangeably, and I'd really like to know which I should be using.
>
>
> Second, the documentation says to define "ensure" as a parameter, but the
> example I saw seems to do what I'm doing in that file.
>

not sure what you mean here.


> Which is right?
>

if you just need absent/present ensure states, then use the ensurable method
(expects create/exists?/destroy on the provider). otherwise it should be
created as a property.

-Dan


>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to