]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rng: Forbid to validate mismatched <disk> 'device' and 'type' attributes
authorErik Skultety <eskultet@redhat.com>
Fri, 17 Apr 2015 11:14:12 +0000 (13:14 +0200)
committerErik Skultety <eskultet@redhat.com>
Mon, 20 Apr 2015 08:04:06 +0000 (10:04 +0200)
commitcea1b86fa7f140a30220bb2efaece1d2890f2d91
tree8cd46477dcbe5dbd20a8845bdae02fd42ecc571b
parente4725cdb127d10c8326ddd652e7feb817cd4aa75
rng: Forbid to validate mismatched <disk> 'device' and 'type' attributes

According to docs, using 'lun' as a value for device attribute is only valid
with disk types 'block' and 'network'. However current RNG schema also allows
a combination type='file' device='lun' which results in a successfull
xml validation, but fails at qemuBuildCommandLine.
Besides fixing the RNG schema, this patch also adds a qemuxml2argvtest
for this case.

https://bugzilla.redhat.com/show_bug.cgi?id=1210669
docs/schemas/domaincommon.rng
tests/qemuxml2argvdata/qemuxml2argv-disk-device-lun-type-invalid.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c