[chef] Re: stdout poisoning in knife commands


Chronological Thread 
  • From: Ranjib Dey < >
  • To: " " < >
  • Subject: [chef] Re: stdout poisoning in knife commands
  • Date: Wed, 25 Feb 2015 11:19:39 -0800

what exactly you are trying to achieve? most of us find those output very useful (and a vast majority of these features came after user feedback). If you are trying to extend knife from CLI directly  (that shell route i assume), you can use the -Fj flag to format your stuff into json and then use json parsing CLI to format whatever you want. 

Note, you can extend knife very easily using the plugin mechanism, this gives you better control, as well as you can reuse other plugins.

Lastly, if you think an ability to spit out the information as stream, which will facilitate `|` style chaining from command line, you can raise an RFC, and we can work on that, and have an uniform record - line based output across knife plugins. This will involve writing another formatter for core knife (which is not hard, given knife has the whole formatter mechanism anyway).


On Wed, Feb 25, 2015 at 9:15 AM, Ed Ropple < " target="_blank"> > wrote:
Hi,

So a big problem I keep running into with `knife`, as I move away from habitual chef-solo/chef-zero use and into an environment with a Chef server, is a lot of stdout poisoning from these commands. It's very nonstandard for something like 'knife search' to emit unrelated text, such as "N items found", on stdout. It makes it much harder than it needs or, to be honest, _ought_ to be to work with Chef, and it's a real drag. Are there any plans for better stdout/stderr discipline during the Chef 12 lifecycle?

Thanks,
Ed




Archive powered by MHonArc 2.6.16.

§