+100 for Type/Provider separation. I remember the good old days quite well and was really happy when that got split out.
Trevor On Thu, Jan 30, 2014 at 7:22 PM, Luke Kanies <[email protected]> wrote: > From: bert hajee bert hajee <[email protected]> > Reply: [email protected] [email protected] > Date: January 28, 2014 at 10:44:42 PM > To: [email protected] [email protected] > Subject: Re: [Puppet-dev] Puppet Custom Types, the easy way > > Just reread my reaction. Maybe it's not clear what a provider looks like > for an easy_type. To make it really clear, here is the provider: > > require 'easy_type' > require 'utils/oracle_access' > > Puppet::Type.type(:oracle_user).provide(:simple) do > include EasyType::Provider > > desc "Manage Oracle users in an Oracle Database via regular SQL" > > mk_resource_methods > > end > > Besides the description. It's actually the same for ant easy_type. > > Yeah, I looked at the provider. My question is whether that provided gets > modified by all the methods in easy_type, or whether it stays like it is, > and all the work is done in the type. > > We used to not have providers, and instead all work was done in types, but > now ideally the provider is the class that runs the shell scripts, talks to > the system, etc., and the type is just responsible for modeling the > resource, doing data validation, etc. > > -- > http://puppetlabs.com | http://about.me/lak | @puppetmasterd > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/etPan.52eaecbc.3d00b9d9.20af%40claymore.local > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 [email protected] -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoUPcxS0iifVyYPw5VGHOMu7CEFtVnZWbQfMPgehqwkEyg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
