On 2014-31-01 1:22, Luke Kanies wrote:
From: bert hajee bert hajee <mailto:[email protected]>
Reply: [email protected] [email protected]
<mailto:[email protected]>
Date: January 28, 2014 at 10:44:42 PM
To: [email protected] [email protected]
<mailto:[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.


I can imagine the system evolving even further in that direction and ultimately requiring that any behavior above basic data type / integrity checks is implemented in a provider.

Regards
- henrik


--
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/lceqkf%24upd%242%40ger.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to