Hi Nan, Not sure if this will do what you want, but can you use 'initialize' to set up an instance variable that pulls from the catalog and then reference that instance variable later in your self.* methods?
Thanks, Trevor On Thu, Jan 29, 2015 at 8:37 PM, Nan Liu <nan....@gmail.com> wrote: > I'm trying to use ini_setting as a parent provider. Everything works well, > but to support purging, the resources provider need to specify the target > file via self.file_path. Initially this seems straightforward, but the > config file location can vary based on installation settings. All the > examples I've seen have a hard coded filepath in self.file_path. I can't > use parameter in the puppet type to provide the file path because it's only > accessible in the normal setter/getter via resources[:file_path]. > scope.lookupvar is definitely not available, so is there a way to access > the catalog in self.* methods in the provider? > > Thanks, > > Nan > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/CACqVBqAVp6uLOGoQLjhCAw7gpBXu_bAdcoBu4Tyg64cVuK75KA%40mail.gmail.com > <https://groups.google.com/d/msgid/puppet-dev/CACqVBqAVp6uLOGoQLjhCAw7gpBXu_bAdcoBu4Tyg64cVuK75KA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- 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 puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoUAd5%2BDzjG5S_k-hh2g50Vbx9dsy4vppMKDuUkr8veg1Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.