Bit of a blast from the past, but thought it's probably better to bring this one back then start a fresh...
Anyway, I've updated the netapp_export type/provider in my NetApp device module to use a prefetch/flush model. Also made a lot of changes to support setting of NFS export security. Code has been committed here: https://github.com/fatmcgav/fatmcgav-netapp/commit/749fad43971039575464d29e188ff2b975c6d3a2 The one thing I havent been able to work out is that when creating new resources, both create and flush get called... Is there a way of stopping the flush from being called if the resource is being created for the first time? Comments/ideas on how to improve welcome. Regards Gavin On Tuesday, 12 February 2013 16:31:16 UTC, Gavin Williams wrote: > > Ken > > Cheers for the response. > > Will have a read and see if I can work it out :) > > Cheers > Gavin > > > On 12 February 2013 16:13, Ken Barber <[email protected]> wrote: > >> This is certainly how we handle the firewall/iptables case, using >> properties and a late flush: >> >> >> https://github.com/puppetlabs/puppetlabs-firewall/blob/master/lib/puppet/provider/firewall/iptables.rb#L94-L102 >> >> On Tue, Feb 12, 2013 at 4:02 PM, Gavin Williams <[email protected]> >> wrote: >> > Any opinions out there??? >> > >> > Cheers >> > Gavin >> > >> > On Sunday, 3 February 2013 13:25:21 UTC, Gavin Williams wrote: >> >> >> >> Afternoon all >> >> >> >> I'm working on the next feature needed for our Netapp Network device >> >> module, this time adding support for NFS export security options. >> >> >> >> The current code is here: Provider and Type. >> >> As you can see, it's currently a fairly simple provider, with just a >> >> create, destroy and exists?... >> >> The type has got a couple of params that are part of the core create... >> >> >> >> My current thought is to create some additional properties to handle >> the >> >> additional options required on the NFS Export call... >> >> The additional options are: read-only, read-write, root and sec-flavor. >> >> Reason I want them to be properties is that the export options can and >> >> will change... read-only, read-write and root will also be taking >> arrays >> >> which will need to be iterated in the provider getters/setters... >> >> >> >> Anyhow, that side of things is fairly easy... However the thing that >> >> complicates things is that whilst the properties are all handled by >> separate >> >> getters/setters, I only wanna execute one call against the Network >> device... >> >> So seems ideal for a flush style provider... >> >> >> >> Is that a sensible approach? Or is there a better method? >> >> >> >> Cheers >> >> Gavin >> > >> > -- >> > 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 post to this group, send email to [email protected]. >> > Visit this group at http://groups.google.com/group/puppet-dev?hl=en. >> > For more options, visit https://groups.google.com/groups/opt_out. >> > >> > >> >> -- >> 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 post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/puppet-dev?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-dev?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
