On Sat, Aug 24, 2013 at 8:09 PM, Tom Linkin <[email protected]> wrote:
> Dominic, > > I have done this before: https://github.com/trlinkin/puppet-file_param > > A few other things have done this as well. Usually it is when there is a "resource" that is needed to manage another resource, but isn't a resource itself on disk. There was some network device management work that used that pattern. > You're right in assuming you will need to access the referenced resource > during catalog application time. The only issue is that there is no way to > know if the referenced resource is actually in the catalog until catalog > application time. It would be nice to know if the reference cannot resolve > before the catalog is sent to the agent and partially applied. > > Yes, this is only possible during application right now. > There is a hook for types that gets called when catalog compilation is > complete, but it then only calls the relationship params giving them a > chance to resolve their relationships. I'm currently working on a pull > request to change that situation though. > > Could you give some more details about what you are thinking of changing? > -- > Tom Linkin > Professional Services Engineer > http://puppetlabs.com/ > twitter: @trlinkin > > On Friday, August 23, 2013 at 1:11 AM, Dominic Cleal wrote: > > On 21/08/13 21:12, Trevor Vaughan wrote: > > Interesting. I was thinking that he would be using the resource as part > of a type value. I suppose if you pass it directly to the provider it > would work but it seems that any manipulation in the type itself > wouldn't work. > > Happy to be wrong though. > > > I suspect there's some truth to what you're saying, depending on when > the value's used. If I was trying to access the other resource from the > type's parameter setter or similar, then I suspect this would be parse > order dependent. > > Using the other resource from a provider in the compiled catalog, should > be late enough in the process that it's fully accessible. > > Thanks for your feedback Dan and Trevor. > > -- > Dominic Cleal > Red Hat Engineering > > -- > 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. > > > -- > 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. > -- Andrew Parker [email protected] Freenode: zaphod42 Twitter: @aparker42 Software Developer *Join us at PuppetConf 2013, August 22-23 in San Francisco - * http://bit.ly/pupconf13* **Register now and take advantage of the Final Countdown discount - save 15%!* -- 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.
