Daniel P. Berrange wrote:
On Fri, Sep 28, 2007 at 02:52:51PM +0100, Richard W.M. Jones wrote:
# src/virsh capabilities
[...]
<topology>
<cells num='1'>
<cell id='0'>
<cpus num='4'>
<cpu id='0'/>
<cpu id='1'/>
<cpu id='2'/>
<cpu id='3'/>
</cpus>
</cell>
</cells>
</topology>
Do we really need such verbose XML. At the very least the 'num' attribute
is redundant, since you can trivially do count(/topology/cells/cell) or
count(/topology/cells/cell[@id=0]/cpus/cpu) XPath exprs in both cases.
The addition of extra tags every time we have a list is not the style we
have normally used in libvirt. eg, we don't use
<disks>
<disk>
..
</disk>
<disk>
..
</disk>
</disk>
to surround the list of disks in a domain.
I'd prefer to see it looking more like this:
<topology>
<cell id='0'>
<cpu id='0'/>
<cpu id='1'/>
<cpu id='2'/>
<cpu id='3'/>
</cell>
</topology>
Regards,
Dan.
That would simplify the code since the counts wouldn't need to be known
up front. This was the format suggested by Daniel V and I used it,
assuming he knows more about libvirt's desired/required xml structure.
--
Elizabeth Kon (Beth)
IBM Linux Technology Center
Open Hypervisor Team
email: eak@xxxxxxxxxx
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list