Man o man why didn't I think of that - well that's the reason for these boards - feel like such a tool Thanks John On Wednesday, 19 March 2014 13:30:31 UTC-7, jcbollinger wrote:
> > > On Wednesday, March 19, 2014 12:17:00 PM UTC-5, Daysmen wrote: >> >> Hi >> >> I'm creating a puppet provider that manages the creation/removal and >> modification of a node over restful api. >> >> All the devices attributes can be retrieved in one call however because >> of the nature of the code i have created i cannot use self.instances and >> self.prefetch. >> >> Im using the flushing method as I need to consolidate all changes to as >> few as calls to rest server as possible >> >> Does any one know of a way to create a cache of the results obtained for >> this device info call? >> >> As stated above i cannot use the singleton methods as the code that sets >> up the calls to the rest backend use instance methods >> >> > > And I suppose that you need an instance method for calling the REST > terminus because you need some of the resource instance's parameters. Fair > enough. > > One thing you could do would be to set up all your property getters as > front ends to a common method that retrieves ALL of the available > properties into the resource instance, and then marks the property hash so > that it knows not to do so again when any of the getters is invoked for > that resource. > > > John > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" 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-users/dc84ee56-5f45-4e10-9c73-03b8f6f70ad2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
