]> git.ipfire.org Git - thirdparty/libvirt.git/commit
schema: consolidate RNG for all hostdev <driver> elements
authorLaine Stump <laine@redhat.com>
Fri, 5 Jan 2024 01:12:51 +0000 (20:12 -0500)
committerLaine Stump <laine@redhat.com>
Mon, 8 Jan 2024 04:57:09 +0000 (23:57 -0500)
commitdeefaf8f1c2147ce2a3b325068a6a4be9b5f7281
treeb23d0f2d46d09d0f0251b46a1a2b501b668fef23
parent568efef729588a843f0a8a6445ea19892c143269
schema: consolidate RNG for all hostdev <driver> elements

The exact same element can appear in <hostdev> and <interface
type='hostdev'>, and nearly identical in <network> and <networkport>
(these latter two don't include "xen" as a possible driver, but that's
coincidental - there's no reason Xen couldn't also use the VF pools in
virtual networks, it just doesn't).

This patch modifies all 4 to use the same <ref name="hostdevDriver"/>
so that it is simpler to add something new.

A side effect of this patch is that the grammar for the <interface>
element in domain XML has been tightened up a bit - previously it was
accepted by the schema (but nonsensical) to have virtio and network
interface options specified; as a part of making the two different
<driver> choices each a complete element (rather than each being a
collection of attributes and subelements) these extra
attributes/subelements that were irrelevant to the hostdev-type
<driver> were made to be valid only for an emulated interface's
<driver>.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/schemas/basictypes.rng
src/conf/schemas/domaincommon.rng
src/conf/schemas/network.rng
src/conf/schemas/networkport.rng