From: Peter Krempa Date: Thu, 13 Oct 2022 12:01:24 +0000 (+0200) Subject: schema: Re-structure schema for to avoid broken validation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ad5c4be09fe415b4161c4b04ca2ef96f30a0509b;p=libvirt.git schema: Re-structure schema for to avoid broken validation The validation of a '' device fails if the elements inside are not ordered in the order in the schema despite using . This is a bug in libxml2's validator as removing the '' property from the definition of the 'type' attribute with 'mount' variable fixes the problem. I've reported it as another instance of a seemingly related issue: https://gitlab.gnome.org/GNOME/libxml2/-/issues/131 Meanwhile libvirt can re-arrange the schema by extracting the common bits into a new definition and referencing them from each of the choice groups explicitly. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/392 Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Daniel P. Berrangé --- diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 5ff15e8787..d346442510 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -2860,205 +2860,212 @@ + + + + + + + + + + + passthrough + mapped + squash + + + + + + + default + remap + forbid + warn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - file - - - - - - - - - - - - - - - - block - - - - - - - - - - - - - - - + + + + virtio + virtio-transitional + virtio-non-transitional + + + + + + + file + + - - mount - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - bind + + + + + + + + + + + block + + + + - - - - - - - - - - - - - - - template - - - - - - - - - - - - - - - - ram - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - passthrough - mapped - squash - + + mount - - + + + + + + + + - default - remap - forbid - warn + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + + bind + - - - - - + + + + + + + + + - - - - + + + + + + template + + + + + + + + + + - - - - - - virtio - virtio-transitional - virtio-non-transitional - + + + + + + ram - - + + + + + + + + + + + + + + + + + + + +