On Mon, Nov 06, 2023 at 02:38:47 -0500, Laine Stump wrote:
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(a)redhat.com>
---
src/conf/schemas/basictypes.rng | 13 +++
src/conf/schemas/domaincommon.rng | 173 ++++++++++++++----------------
src/conf/schemas/network.rng | 10 +-
src/conf/schemas/networkport.rng | 10 +-
4 files changed, 94 insertions(+), 112 deletions(-)
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>