On Apr 24, 2012, at 1:49 PM, Eric Sorenson <[email protected]> wrote:
> Luke, thanks for taking the time to reply. This is very helpful - a couple of > comments inline... > > On Apr 17, 2012, at 9:55 PM, Luke Kanies wrote: > >> My first thought on reading the doc briefly was that it's a kind of subgraph >> - I assumed you were compiling the whole catalog and then only looking at a >> bit of it. I realize now you're just modifying the class list, rather than >> modifying the output, and I *think* you're pretty-printing the resulting >> catalog in json, although it's a bit hard to tell from the docs. > > It's not as pretty as I'd like, but yep that's the idea. > >> This seems like a useful tool, especially for the use case in question, but >> you could maybe provide a more general tool by building some graph selection >> capabilities. E.g., something like: >> >> $ puppet subgraph 'Class[foo::bar]' >> [ snip ] >> There are about a billion graph operations you could do, but most are pretty >> useless for us. I have been thinking of something like this as a >> replacement for --tags: Build a more powerful selection tool that could just >> print a catalog, apply it, etc. > > The specific use case I wanted to address was viewing template output when > the data come from an external data source and the result of > template/controller logic is complicated enough that you can't just look at > it and derive what will happen. But yes it would be really nice to be able > to do more complete, graph-oriented operations on the catalog, because the > broader idea is that people should be able to test how their code will behave > on production systems without having to physically be on the system in > question, by convincing the data store that your client ought to get the > value resolution that the real box would. I definitely agree. At interest on your part in turning this into a general tool with that purpose? I'd love to help. >> In terms of the indirection syntax, um, unfortunately, yes, that's largely >> what you do. I think Daniel has finally reverted the code that required the >> Catalog.indirection.find call, so in the latest versions you can again just >> do Catalog.find, but you should also be able to just use a face from now on: >> >> Puppet::Face[:catalog, "current"].find(…) >> >> I'm not totally thrilled with that UI, either, but we're working on it. > > > OK, good to know. Thanks again. > > - Eric Sorenson - N37 17.255 W121 55.738 - http://twitter.com/ahpook - > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
