We have written a library to make it easier to build Puppet Custom Types. Check out our first blog post introducing easy_type. I'm really curious if this fits the needs of any Puppet developers out there. Please let me know if you like it. Also let me know if you don't like it or would like to see some changes.
Hi Bert,
I love the idea of a library that makes it much easier to build native types and providers.
Am I reading correctly that most of the work is in the type, thought? Is it adding the right getters and setters on the provider?
Am I reading correctly that most of the work is in the type, thought? Is it adding the right getters and setters on the provider?
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.
--You received this message because you are subscribed to the Google Groups "Puppet Developers" group.To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/etPan.52eaecbc.3d00b9d9.20af%40claymore.local.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
+100 for Type/Provider separation.I remember the good old days quite well and was really happy when that got split out.Trevor
--
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 puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/a1c9c311-a409-47ca-9467-4097f81729f9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- Johan De Wit Open Source Consultant Red Hat Certified Engineer (805008667232363) Puppet Certified Professional 2013 (PCP0000006) _________________________________________________________ Open-Future Phone +32 (0)2/255 70 70 Zavelstraat 72 Fax +32 (0)2/255 70 71 3071 KORTENBERG Mobile +32 (0)474/42 40 73 BELGIUM http://www.open-future.be _________________________________________________________
Upcoming Events:
Puppet Fundamentals Training | http://www.open-future.be/puppet-fundamentals-training-4-till-6th-february
Puppet Introduction Course | http://www.open-future.be/puppet-introduction-course-7th-february
Zabbix Certified Training | http://www.open-future.be/zabbix-certified-training-10-till-12th-february
Zabbix for Large Environments Training | http://www.open-future.be/zabbix-large-environments-training-13-till-14th-february
Subscribe to our newsletter: http://eepurl.com/BUG8H
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.
The discussion seems to go in the direction of not having a provider.
easy_type is by no means at all meant to stop using a provider. Actually, it is by no means a total replacement for the Type and Provider pattern. What it is, is an add-on module for people, less knowledgeable about Puppet (and the intricacies of Types and providers) to have a custom type for an easy kind of resource.
Probably only on one kind of OS.
That said about the current discussion, what I like about the discussion, is that we seem to all have the idea, it should be easier to make custom types. While we disagree on (at least some) of the directions I took with easy_type. Why not turn this into a discussion on what we would like to see in an easy way to build a type.I'l start, but please join:- A way to keep it close to people who know about the resource, but less about Puppet- Be able to easy abstract different OS-es and version (Like the current provider- Make it easier to call a set of standard available (and extendable) validators- Make it easier to call a set of standard available (and extendable) mungers.- Make it easy to gradually build the os command by stating a base part and extending it if a property or a name is specified in the resource definition.
On Saturday, February 1, 2014 7:48:53 AM UTC-6, bert hajee wrote:The discussion seems to go in the direction of not having a provider.
I must have missed all that.
Yeah, I think that would be a bad overall direction, both because it reduces flexibility, and also because over time Puppet will switch to requiring providers.
Hopefully EricS can chime in here, but I know API docs are something the team is working on pretty heavily.
The main problem in this area is that there’s quite a bit of stuff that also needs to be deprecated, so the balance is between fixing things vs documenting them.