On Fri, 2008-10-17 at 09:29 -0500, Luke Kanies wrote:
> On Oct 17, 2008, at 7:05 AM, Brice Figureau wrote:
> 
> >> Is it worth having this syntax work on non-virtual resources, with  
> >> the
> >> additional behaviour of it automagically realizing virtual resources?
> >
> > Can you explain what you mean?
> > You lost me with this last sentence :-)
> 
> 
> Right now, the query syntax will only "return" virtual resources,  
> which means one can only use this syntax to modify arbitrary numbers  
> of virtual resources.

OK, understood.

> People generally want the ability to modify arbitrary resources  
> anyway, though, so does it make sense to have a syntax that allows  
> modification of resources without the requirement (of the current  
> query system) that the resources be virtual?

They can use the current resource overriding system, but they don't have
the possiblity to use the collection query.

> I just had a thought, though -- if one has a virtual resource and two  
> of these resource-modifying queries, will the first query mark the  
> resource non-virtual and the second query be a no-op because the  
> resource isn't virtual any more?  E.g.,

I'm pretty sure that's a yes.

> class base {
>    file { "/tmp/test": content => foo }
> }
> 
> class sub inherits base {
>    File <| |> { mode => 666 }
> }
> 
> class other inherits base {
>    File <| |> { content => bar }
> }
> 
> include sub, other
> 
> The first query will make the resource non-virtual, and I think that  
> means the second query will null-op, which means the override wouldn't  
> happen.
> 
> Right?
>
> As expected, I just ran this code in your 1088 branch, and just the  
> first override took affect.

Yes, you're right. 
Is it something I should change?
But then, when to mark the resource non virtual anymore?
-- 
Brice Figureau <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to