On Apr 19, 2012, at 10:58 AM, Jo Rhett wrote:
> On Apr 19, 2012, at 9:24 AM, Andrew Parker wrote:
>> What do you do with inheritance (classes or nodes) wrt variables? Avoid?
>> Using a lot? Have a specific pattern that you follow?
>
> I have used inheritance for overriding an object -- since it's the only thing
> that can accomplish that, but I found that trying to use inheritance
> basically broke the brain of everyone else trying to use the modules. And
> frankly, even I found Puppet's inheritance tricky at best. And I use it
> extensively in C++ and Perl and Python, so it's not something I avoid
> everywhere. It seems to not provide enough handles to be really useful, and
> nearly impossible to debug.
>
So the main, sane, use case for inheritance is to set resource defaults. That
is the same thing I've heard from others, so at least people seem to agree on
that :)
> Puppet could very desperately use a debugging compiler -- attach as a given
> node and output the streams which get one to the compiled catalog state. Show
> every assignment, every override, everything.
>
Hmmm, that would be interesting. Might put out a lot of information, though,
which would make it hard to follow.
>> If you are 100% parameterized why do you need to reach for node-level
>> variables? Shouldn't everything be a parameter to the class/define?
>
> That simply wasn't always possible. I ran into a few situations which
> required us to have node-level variables. I forget offhand, but it was
> definitely one of those "Puppet is half way between Include and Class {} at
> this point, and isn't good at either one" frustration points. I'll try to
> come up with examples.
>
Please send me those examples if you can think of them. If parameterized
classes are supposed to be the future and they can't handle all of the
situations that people think they should, then we need to think of something to
deal with that.
> --
> Jo Rhett
> Net Consonance : consonant endings by net philanthropy, open source and other
> randomness
>
>
> --
> 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.
--
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.