On Friday, May 4, 2012 1:42:35 PM UTC-7, Chris Price wrote:
>
> I'm not an expert on the topic, but my understanding is that you can't 
> create a type without well-defined property/parameter names.  Or, to put it 
> a different way, there is currently no officially sanctioned means by which 
> to support dynamic property/parameter names for a type or a provider.
>
> One way that you could work around it is to define a property with a name 
> like "options", whose value would be a hash.  Then there are no 
> restrictions on your hash key names.
>
> There is some discussion around this topic on the following tickets:
>
> http://projects.puppetlabs.com/issues/4113
> http://projects.puppetlabs.com/issues/12843
>
>
Thanks for the reply.

It looks like I'll just have to hack around things by forcing checks in 
exists?, along the lines of
    if ! defined?(@resource[:property])
      raise ArgumentError, "sysprop requires 'property' to be defined"


Except that... that doesnt seem to be working as-is. Guess I need to use a 
different conditional.

-- 
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/-/2XCTfQQPWrkJ.
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.

Reply via email to