Rob McBroom
2010-Aug-26 19:16 UTC
[Puppet Users] Is it safe to both import and inherit from a class?
I have some classes that inherit from others. For instance, the ldapconsumer and ldapprovider classes inherit from the ldap class. On an external node, I might have both ldap and ldapconsumer classes, so the ldap class is being "invoked" directly, but also by the fact that ldapconsumer is inheriting from it. This seems to be working fine (in 0.25.5), but I wonder if that''s by design or by accident. Can I count on this behavior going forward? If you''re wondering why I would have the classes defined like that, it''s to make things easier on humans. For instance, it''s much easier to find all LDAP servers by searching for `class=ldap` than `(|(class=ldapconsumer)(class=ldapprovider))`. -- Rob McBroom <http://www.skurfer.com/> The magnitude of a problem does not affect its ownership. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan Bode
2010-Aug-26 19:24 UTC
Re: [Puppet Users] Is it safe to both import and inherit from a class?
I would consider any breakage on this in the future a bug as I also take advantage of this to support class overrides in external node classifiers (can we just start calling this an enc?) Although this capability might seem accidental, it actually makes sense in a declarative language. -Dan On Thu, Aug 26, 2010 at 12:16 PM, Rob McBroom <mailinglist0@skurfer.com>wrote:> I have some classes that inherit from others. For instance, the > ldapconsumer and ldapprovider classes inherit from the ldap class. > > On an external node, I might have both ldap and ldapconsumer classes, so > the ldap class is being "invoked" directly, but also by the fact that > ldapconsumer is inheriting from it. > > This seems to be working fine (in 0.25.5), but I wonder if that''s by design > or by accident. Can I count on this behavior going forward? > > If you''re wondering why I would have the classes defined like that, it''s to > make things easier on humans. For instance, it''s much easier to find all > LDAP servers by searching for `class=ldap` than > `(|(class=ldapconsumer)(class=ldapprovider))`. > > -- > Rob McBroom > <http://www.skurfer.com/> > > The magnitude of a problem does not affect its ownership. > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Rob McBroom
2010-Aug-26 19:41 UTC
Re: [Puppet Users] Is it safe to both import and inherit from a class?
On Aug 26, 2010, at 3:24 PM, Dan Bode wrote:> I would consider any breakage on this in the future a bug as I also take advantage of this to support class overrides in external node classifiers (can we just start calling this an enc?) > > Although this capability might seem accidental, it actually makes sense in a declarative language.Good to know. Thanks. -- Rob McBroom <http://www.skurfer.com/> Before you give the government new power to go after bad guys, remember this: The power will be permanent. The definition of “bad guys ” will not. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.