Nice!  More good things to look forward to.  :)

On Wed, Jun 8, 2011 at 1:58 PM, Nigel Kersten <ni...@puppetlabs.com> wrote:

>
>
> On Wed, Jun 8, 2011 at 1:36 PM, Aaron Grewell <aaron.grew...@gmail.com>wrote:
>
>> We've looked at two different possibilities thus far:
>>
>> 1) Make all resource types hash-aware.  This is what I was originally
>> asking for.  It would mean changing the way resources are declared so that
>> in the case of a hash their representation of $name was appropriate for use
>> with defines and virtuals.  This could either be done by requiring the hash
>> to have a 'name' key and using that or by creating a metaparameter like
>> hash_key so it could be user-specified.  The hash itself would need to be
>> passed to the resource in the same way as $name but with a different
>> identifier so that its keys could be accessed inside the resource as e.g.
>> $data[key].
>>
>> The upside of this is that it should work universally and conceptually
>> match the rest of Puppet, the downsides I see so far are that its
>> implementation might well be intrusive and it might also add to the DSL.
>>
>> 2) Create a hash -> resource transformation function.  If I understood
>> John correctly this is what he was in favor of.
>>
>> The upside of this is it should be less intrusive, easier to implement,
>> and require no DSL changes.  The downside is that it still makes hashes
>> special and requires separate handling of them.
>
>
> 2.7.x merged the older "hash2resource" function as "create_resource"
>
>
> https://github.com/puppetlabs/puppet/blob/2.7.x/lib/puppet/parser/functions/create_resources.rb
>
> I'm actually not sure where the definitive home for hash2resource is,
> perhaps someone else will chime in.
>
>
>
>
>
>>
>>
>>
>> On Wed, Jun 8, 2011 at 12:58 PM, Randall Hansen 
>> <rand...@puppetlabs.com>wrote:
>>
>>> On Wed, Jun 8, 2011 at 12:07 PM, Aaron Grewell <aaron.grew...@gmail.com>
>>> wrote:
>>>
>>> > All I'm saying is that I think hashes should be first-class citizens in
>>> > Puppet and right now they're not.
>>>
>>> I agree with that as a high-level problem statement, but to make
>>> progress we need to put legs on it.  John's got one possibility:  a
>>> new built-in function.  I agree with him that the DSL is too crufty,
>>> but I don't think this needs to add to it if done well.
>>>
>>> Here's another possibility, I think:
>>>
>>> http://groups.google.com/group/puppet-users/browse_thread/thread/162d86ed39d6d8da
>>>
>>> What do you think?  I must admit not to understand all the details.
>>> As D. UX I mostly try to squeeze ideas out of other people. :)  I'll
>>> try to keep the conversation going and help us coalesce around the
>>> details, but I'll need help from people who really have skin in the
>>> game.
>>>
>>> Thanks,
>>>
>>> r
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Puppet Users" group.
>>> To post to this group, send email to puppet-users@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.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@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.
>>
>
>
>
> --
> Nigel Kersten
> Product, Puppet Labs
> @nigelkersten
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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