[Libguestfs] [PATCH] builder: translate more user-visible strings
Pino Toscano
ptoscano at redhat.com
Fri Dec 6 17:45:03 UTC 2013
On Friday 06 December 2013 14:50:08 Richard W.M. Jones wrote:
> On Fri, Dec 06, 2013 at 02:58:27PM +0100, Pino Toscano wrote:
> > OTOH, that makes me think whether virt-builder shouldn't have some
> > kind of porcelain/XML/JSON/CSV/etc output for --list to ease its
> > parsing, as it could be translated and changed anytime (like done
> > above). Good idea? If so, which format?
>
> First of all cannot change the existing format, but we can certainly
> add a flag to choose an alternate format. cf. 'qemu-img info' has a
> flag that lets you select between "human" and "json".
Yes, that's one of the things I had in mind, adding a new output mode
for --list aside the current one. We could just mimic qemu-img then,
with --format=json|human (with human being the default one providing the
current output).
> I have no strong opinions about the format to use. One which doesn't
> require any external library, but since this is output rather than
> input we probably don't need an external library.
libguestfs has libyajl as JSON parsing library so theoretically it could
be optionally used as well. But yeah, virt-builder could it do without.
/me adds to low-priority TODO
--
Pino Toscano
More information about the Libguestfs
mailing list