Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread markus
> I just finished something very similar: > > > def self.title_join(hash) > "#{hash[:domain]}/#{hash[:type]}/#{hash[:item]}" > end > > where the default case was: > > + def self.title_join(hash) > +case key_attributes.length > +when 0,1; hash[:name] > +else > + Puppet

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread Dan Bode
I just finished something very similar: def self.title_join(hash) "#{hash[:domain]}/#{hash[:type]}/#{hash[:item]}" end where the default case was: + def self.title_join(hash) +case key_attributes.length +when 0,1; hash[:name] +else + Puppet.warning('you should specify

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread markus
So what if we replaced this: 910 title = hash.delete(:title) 911 title ||= hash[:name] 912 title ||= hash[key_attributes.first] if key_attributes.length == 1 With something that took an array of arrays of strings and symbols and "reconstitutes" the title from the first one that matches: tit

[Puppet-dev] Fwd: questions regarding #5605

2011-05-22 Thread Dan Bode
-- Forwarded message -- From: Dan Bode Date: Sun, May 22, 2011 at 3:02 PM Subject: questions regarding #5605 To: stefan.schu...@taunusstein.net Hi Stefan, I recently was trying to used parsedfile with composite namevars, so I, of course ran across all of your tickets/patches/sug

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread Dan Bode
On Sun, May 22, 2011 at 4:42 PM, markus wrote: > > > It actually seems to get a little sticky for purging, below I am > > outlining how it works, I was just curious if anyone has spent time > > thinking about this use case before and how it should work: > > > > As far as I can tell, the title_pat

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread markus
> It actually seems to get a little sticky for purging, below I am > outlining how it works, I was just curious if anyone has spent time > thinking about this use case before and how it should work: > > As far as I can tell, the title_patterns can only map in one direction > title->parameters Th

[Puppet-dev] [PATCH/mcollective 1/1] 7620 - Destination names used during subscribe and unsubscribe should be created in the connectors

2011-05-22 Thread R.I.Pienaar
MCollective core now does not need to know how the middleware works all it does is ask the connector to subscribe to either a :broadcast, :directed or :reply queue. The connector then decides how to handle that. Further work in #7619 is needed to fully realize the abstraction. The Stomp connecto

[Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread Dan Bode
Hi all, I have been working on getting composite namevars to work with parsedfile. It actually seems to get a little sticky for purging, below I am outlining how it works, I was just curious if anyone has spent time thinking about this use case before and how it should work: As far as I can tell

[Puppet-dev] [PATCH/puppet 1/1] Fixed #7622 - Changed use of confine :true to confine :feature

2011-05-22 Thread James Turnbull
This is better, because logging is better (you get told you're missing the feature, as opposed to 'got false when expected true), and it also allows the system to only load the feature if needed (when suitability is tested), whereas this loads the feature even if it's never needed. Signed-off-by: