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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux