Hi folks,
I'm trying to write a new provider, to set SMF properties, and I need help
on a piece of puppet internals syntax.
I understand(?) that generally speaking when a resource has a KNOWN set of
property names, for example, "quota" and "readonly", all you have to do to
properly handle that sort of thing is,
def quota
(return value of quota)
end
def quota=
(set quota to be equal to :name value)
end
However, I'm trying to write a provider, where the property names are
free-form.
>From the end user point of view, usage should look something like
###site.pp
node somenode{
mynewtype { 'svc:/top/level/holder':
property => 'funky_holder_switch',
value => 'blue_switch'
}
}
#####
The name of the value in "property" is completely unknown to me at time of
writing the provider code. it could be literally anything the user chooses.
How can I handle that?
For the curious, I already figure that the end result, will be a command
line that looks like
svccfg("-s", @resource[:name],"setprop", @resource[:property],"=", :value)
I know how to do that backend part. and I've written the front end 'type'
definition. I'm just missing the trick of finding the middle layer glue to
connect the two together :-}
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-dev/-/JBpEd0SYmoMJ.
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-dev?hl=en.