[PATCH 2/2] schemas: Drop <interleave/> from capabilities schemas

Michal Prívozník mprivozn at redhat.com
Wed Jul 20 10:04:08 UTC 2022


On 7/20/22 10:42, Daniel P. Berrangé wrote:
> On Wed, Jul 20, 2022 at 08:36:29AM +0200, Michal Privoznik wrote:
>> Currently, we have two types of output only XMLs: capabilities
>> and domaincapabilities. Neither of these is ever parsed.
>> Moreover, the order of elements inside these two documents is
>> well defined by their respective format functions. Therefore,
>> there's no need to have <interleave/> anywhere in their
>> corresponding schemas.
> 
> The consumers of libvirt need to parse the XML, and they may wish
> to use the RNG files to validate. If the libvirt XML formatter has
> ever, or will ever, change ordering of elements, our RNG should
> be prepared for that. IOW, we should consider the RNG to be something
> that must validate XML output by all previous versions of libvirt.

Well, that's a very strong requirement that we don't even have for
domain XML. I though that using RNG from corresponding libvirt release
is recommended.

> How confident can we be that we've never changed the order of
> any elements ?  IMHO its best practice to always use <interleave/>

We're currently only halfway there. Some elements are allowed to
interleave, some aren't. But okay, let's drop my patches and if we ever
decide to change ordering we'll have domaincapstest, well virschematest
shouting at us.

Michal



More information about the libvir-list mailing list