From deefaf8f1c2147ce2a3b325068a6a4be9b5f7281 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Thu, 4 Jan 2024 20:12:51 -0500 Subject: [PATCH] schema: consolidate RNG for all hostdev elements The exact same element can appear in and , and nearly identical in and (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 so that it is simpler to add something new. A side effect of this patch is that the grammar for the 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 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 were made to be valid only for an emulated interface's . Signed-off-by: Laine Stump Reviewed-by: Peter Krempa --- 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(-) diff --git a/src/conf/schemas/basictypes.rng b/src/conf/schemas/basictypes.rng index 26eb538077..8d5f4475ca 100644 --- a/src/conf/schemas/basictypes.rng +++ b/src/conf/schemas/basictypes.rng @@ -656,4 +656,17 @@ + + + + + kvm + vfio + xen + + + + + + diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index f318c06797..c1c267d303 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -3762,18 +3762,12 @@ - - - - - - kvm - vfio - xen - - - - + + + + + + @@ -3811,90 +3805,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - - + + + + @@ -6227,16 +6221,7 @@ - - - - kvm - vfio - xen - - - - + diff --git a/src/conf/schemas/network.rng b/src/conf/schemas/network.rng index cda174ab4b..e56e07d130 100644 --- a/src/conf/schemas/network.rng +++ b/src/conf/schemas/network.rng @@ -179,15 +179,7 @@ - - - - kvm - vfio - - - - + diff --git a/src/conf/schemas/networkport.rng b/src/conf/schemas/networkport.rng index 14db949578..50995559e8 100644 --- a/src/conf/schemas/networkport.rng +++ b/src/conf/schemas/networkport.rng @@ -145,15 +145,7 @@ - - - - kvm - vfio - - - - + -- 2.39.5