-
由 Eric Blake 提交于
In general, we try to make virt-xml-validate tolerant of input elements in any order when possible. However, as written, the RNG grammar did not permit <source> unless there was an explicit type= attribute (even though the C code manages just fine by defaulting to type='file'). After making the attribute optional on the 'file' branch, I noticed that the use of diskspec was now redundant with the branch when no <source> was supplied. View this patch with 'git diff -b' for a better picture of the schema change. * docs/schemas/domaincommon.rng (disk): Hoist 'diskspec' out of choice, make type='file' default, and still preserve interleave. * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-source-pool.xml: * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml: New files. * tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml: * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml: Reorder XML. * tests/qemuxml2xmltest.c (mymain): Cover new files. Signed-off-by: NEric Blake <eblake@redhat.com>
a9efe2d7