Dan Smith wrote:
We have, so far, been ignoring the vcpu bit of XML generation, mostly
because
we treat multiple vcpus as separate devices in the CIM world, but as a single
integral value in the libvirt world. This set changes the way the xml
generation code is structured to handle batches of devices, and then adds
support for generating the VCPU node.
It's a little strange, but I decided that allowing a given device class to
modify and append the XML being generated for its class was the safest
way to handle all the cases without separating things out too much. Comments
on this approach are welcomed.
I believe that this set will also make ModifyResource in VSMS work for VCPUs
as well, since it should be able to generate updated XML with the new
vcpu count after such an operation. More testing to determine if additional
work will be required needs to be done.
I'm unopposed in principle, and the implementation in these patches
seems sound, so I would put my vote in the oh-so-confident position of,
"Sounds like a good idea to me," while still leaving plenty of room to
say, "Oh I was pretty sure there was a problem all along," if Heidi sees
a CIM issue here. We're in a bit of a tricky position either way when
we have to bridge the two concepts of how to treat VCPUs, so we might as
well keep as much of it right in with the device class as we can. That
way, if we find a problem, it won't be spread all over the place; we'll
know exactly what we need to change.
--
-Jay