[libvirt] Improving virsh for scripting: easily parseable output?

Justin Clift justin at salasaga.org
Wed Jun 23 10:24:10 UTC 2010


On 06/23/2010 06:58 PM, Daniel P. Berrange wrote:
<snip>
> --details is still targetted at humans. If you want something more
> easily parseable it should use a structured format like CSV. So I
> don't think we should be overloading --details for this purpose.

It sounds like there would be good benefit to directly improving the 
output of virsh for scripting.

As a thought for the right approach, maybe having command line options 
affecting the output delimiters (field & record separators), suppress 
headings, and using a "better approach" for errors?

Initial thinking is something like:

   -D  --data-only
             data only (no header in output)

   -F, --field-separator=STRING
             set field separator (default: "|")

   -R, --record-separator=STRING
             set record separator (default: newline)

Unsure about error handling though.  Any suggestions?

Regards and best wishes,

Justin Clift

-- 
Salasaga  -  Open Source eLearning IDE
               http://www.salasaga.org




More information about the libvir-list mailing list