On Fri, Mar 14, 2014 at 11:07:21AM +0000, Daniel P. Berrange wrote:
I understand why you chose to use nesting, but I can't say I
like
the appearance of nesting. I think that in the common case where
we have a single non-branching chain, the XML structure is kind of
unpleasant and would be nicer if just a flat list. Using nesting
makes it harder to extract info about backing files from the XML
structure with XPath because you can't simply ask for all <source>
elements at a given location.
OTOH, with nesting, existing XPath queries keep working.
https://github.com/libguestfs/libguestfs/blob/master/src/libvirt-domain.c...
Have a look in this file for existing XPath queries involving /source
However a flat list of backingStore nodes (as you suggested later)
would not break anything.
I don't think we want todo that - there are genuine use cases
where
that is a reasonable thing todo. eg you can provide a raw file to a
guest and that guest may genuinely want to format the virtual disk
it received with some other format. We don't want to taint such use
cases.
Ewww by formatting you mean turning raw into qcow2??
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming blog:
http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)