Description of problem: Virsh does not produce machine readable output for other tools/applications to consume. A --colon or --csv switch will solve the issue. For example some lvm tools(lvdisplay) separate output by colon while other tools use the csv option. IRC quote: (11,41,45) rjones: atodorov, definitely I agree with you ... in the virt tools I write, I'm using the --csv option to generate CSV output (eg. see virt-df) Looks like --csv is preferred to make it consistent across all tools. Version-Release number of selected component (if applicable): libvirt-0.6.3-20.el5 (but the RFE is valid for all later vesions) How reproducible: Always Additional info: I'm personally interested in the virsh list command because I'm using bash but this RFE should be implemented for all commands if possible.
just a note that "for all commands if possible" won't be possible for XML dump commands. --csv patches welcome they should just be sent upstream to libvir-list Daniel
I don't think that virsh is a correct tool to do that. Virsh is a CLI for users, not for programs and if someone wants to use libvirt in his program, he should use one of our API. For scripting probably the best one is libvirt-python.