[libvirt PATCHv3 02/12] schema: wrap fsDriver in a choice group

Ján Tomko posted 12 patches 6 years ago
There is a newer version of this series
[libvirt PATCHv3 02/12] schema: wrap fsDriver in a choice group
Posted by Ján Tomko 6 years ago
Allow adding new groups without changing indentation.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 docs/schemas/domaincommon.rng | 50 +++++++++++++++++++----------------
 1 file changed, 27 insertions(+), 23 deletions(-)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index ea237a05e5..51dd75b520 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2600,29 +2600,33 @@
            for this kind of info, and 'type' for the
            storage format. We need the latter too, so
            had to invent a new attribute name -->
-      <optional>
-        <attribute name="type">
-          <choice>
-            <value>path</value>
-            <value>handle</value>
-            <value>loop</value>
-            <value>nbd</value>
-            <value>ploop</value>
-          </choice>
-        </attribute>
-      </optional>
-      <optional>
-        <attribute name="format">
-          <ref name="storageFormat"/>
-        </attribute>
-      </optional>
-      <optional>
-        <attribute name="wrpolicy">
-          <value>immediate</value>
-        </attribute>
-      </optional>
-      <ref name='virtioOptions'/>
-      <empty/>
+      <choice>
+        <group>
+          <optional>
+            <attribute name="type">
+              <choice>
+                <value>path</value>
+                <value>handle</value>
+                <value>loop</value>
+                <value>nbd</value>
+                <value>ploop</value>
+              </choice>
+            </attribute>
+          </optional>
+          <optional>
+            <attribute name="format">
+              <ref name="storageFormat"/>
+            </attribute>
+          </optional>
+          <optional>
+            <attribute name="wrpolicy">
+              <value>immediate</value>
+            </attribute>
+          </optional>
+          <ref name='virtioOptions'/>
+        </group>
+        <empty/>
+      </choice>
     </element>
   </define>
 
-- 
2.21.0

Re: [libvirt PATCHv3 02/12] schema: wrap fsDriver in a choice group
Posted by Daniel P. Berrangé 6 years ago
On Thu, Jan 30, 2020 at 06:06:18PM +0100, Ján Tomko wrote:
> Allow adding new groups without changing indentation.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  docs/schemas/domaincommon.rng | 50 +++++++++++++++++++----------------
>  1 file changed, 27 insertions(+), 23 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|