On Mon, Dec 13, 2010 at 3:39 PM, Luke Kanies <[email protected]> wrote:
> On Dec 13, 2010, at 2:00 PM, Dan Bode wrote: > > > Hi all, > > > > I was trying to figure out how to include parametrized classes. I > eventually got it to work with the following syntax, but I don't understand > what it does (I tried to read the code). Can someone explain the magic of > known_resource_types? > > > > classes.each do |name, params| > > klass = Puppet::Resource::Type.new(:hostclass, name, params) > > known_resource_types.add klass > > end > Is this from a function, or what? There's clearly context missing here > (e.g., where do 'params' come from? how is 'classes' created?) > names, and params all come from an external node classifier (I am trying to patch ENC support for param classes) This is actually called form the compiler class. When I get it properly sorted, I will submit a patch. > This shouldn't actually cause class evaluation during parsing - it just > creates the class, what does it mean to create a class in this context? > it doesn't say anything about evaluating it. At least, from what I > understand. > > -- > A government big enough to give you everything you want is big enough > to take from you everything you have. --Gerald R. Ford > --------------------------------------------------------------------- > Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 > > > > -- > 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]<puppet-dev%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > -- 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.
