>From what I tried, instance variables stick with the single instance of the provider, they don't carry across all providers of the same type.
Since, I'm trying to share across the various instances of a provider, I have to use a class variable. Unfortunately, I couldn't figure out how to do it without polluting the global namespace. The native 'mount' provider does the same thing so I didn't dig much deeper to figure out how to work around it. If someone does, I'd love to hear how. Trevor On Sat, Jul 20, 2013 at 6:42 PM, Eric Badger <[email protected]> wrote: > Trevor, > > Thanks for the detailed walkthrough. This sort of thing (i.e. storing > changes and having the last resource flush them) definitely works well in > the case where the final flush depends on the other resources succeeding. > As you mentioned, it will be an issue if you need an unconditional flush. > > Just a thought on your method: why not use an instance variable with an > attr_accessor on the provider class rather than a class variable? That way > it's not putting things into the namespace of other providers. > > Eric > > ------------------------------ > Date: Sat, 20 Jul 2013 18:10:42 -0400 > Subject: Re: [Puppet-dev] finalize/cleanup for a provider > From: [email protected] > To: [email protected] > > > I've posted a walkthrough at > https://www.onyxpoint.com/2013/07/20/storing-puppet-provider-metadata-for-single-instance-application/ > if > you're interested. > > Comments/critiques welcome. > > Also, if there's an easier way to do this, that would be good too. > > Thanks! > > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/puppet-dev. > 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-dev. For more options, visit https://groups.google.com/groups/opt_out.
