
On Sat, Jul 15, 2017 at 12:27 AM, Jim Fehlig <jfehlig@suse.com> wrote:
On 07/11/2017 08:15 AM, Christian Ehrhardt wrote:
What happens is that before the changes this auto-added a driver section like: <driver name='qemu' type='raw'/> But now it does only add <driver type='raw'/> Which fails to verify like:
I think you forgot to paste the example here, but I assume it is something like
# virt-xml-validate test.xml Relax-NG validity error : Extra element devices in interleave test.xml:21: element devices: Relax-NG validity error : Element domain failed to validate content test.xml fails to validate
Yes that was the case I've seen. where test.xml contains disk config
<disk type='file' device='cdrom'> <driver type='raw'/> <target dev='hdb' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk>
As your example or even no <driver> at all - that in the past also got the defaults and no isn't.
It is not clear to me if 'name' is a required attribute of <disk>. The doc says "If the hypervisor supports multiple backend drivers, then the name attribute selects the primary backend driver name". It doesn't mention "required" or "mandatory". We'd have a schema bug if 'name' is optional. I guess it is a good question for danpb. Dan, is disk/driver/@name a required attribute?
Prepping my patch, but surely if the fix is to just relax the relaxng to not have it required I'm good as well.