]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schemas: domain: Make <identity> subelement of NFS disk source optional
authorPeter Krempa <pkrempa@redhat.com>
Thu, 28 Nov 2024 08:05:13 +0000 (09:05 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 28 Nov 2024 09:28:49 +0000 (10:28 +0100)
Both the 'user' and 'group' attribute are optional so <identity> can
be empty. Allow it to be omitted completely. The parser and qemu code
can handle that.

The schema was introduced in 943871f971d680f72726a9d6e9330eec264f6588
and in d018c8dc9ebcd0496c7a564bc2e8b1c9cbd8d96f an offending test was
added.

Fixes: 943871f971d680f72726a9d6e9330eec264f6588
Fixes: d018c8dc9ebcd0496c7a564bc2e8b1c9cbd8d96f
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/schemas/domaincommon.rng

index 7415c37b65511de95244e0295881c180966ebba3..b3fdbf7ffb77143c1e59f9299e82829cb0d99364 100644 (file)
   </define>
 
   <define name="diskSourceNetworkNFS">
-    <element name="identity">
-      <optional>
-        <attribute name="user">
-          <ref name="genericName"/>
-        </attribute>
-      </optional>
-      <optional>
-        <attribute name="group">
-          <ref name="genericName"/>
-        </attribute>
-      </optional>
-    </element>
+    <optional>
+      <element name="identity">
+        <optional>
+          <attribute name="user">
+            <ref name="genericName"/>
+          </attribute>
+        </optional>
+        <optional>
+          <attribute name="group">
+            <ref name="genericName"/>
+          </attribute>
+        </optional>
+      </element>
+    </optional>
   </define>
 
   <define name="diskSourceNetworkProtocolRBD">