]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: schemas: Split up definitions for NBD and gluster
authorPeter Krempa <pkrempa@redhat.com>
Fri, 21 Apr 2017 13:41:29 +0000 (15:41 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 28 Apr 2017 08:22:22 +0000 (10:22 +0200)
NBD does not mandate a "filename". Gluster can have more servers. Split
them so that we can tighten the schema.

docs/schemas/domaincommon.rng

index 12acc687235ca0e335bd977a5e54d8a96813fd8e..6367c059cb8b75737cbe18b54db5afe7ef436290 100644 (file)
     </element>
   </define>
 
-  <define name="diskSourceNetworkProtocolGeneric">
+  <define name="diskSourceNetworkProtocolNBD">
     <element name="source">
-      <interleave>
-        <attribute name="protocol">
-          <choice>
-            <value>nbd</value>
-            <value>gluster</value>
-          </choice>
-        </attribute>
-        <optional>
-          <attribute name="name"/>
-        </optional>
-        <zeroOrMore>
-          <ref name="diskSourceNetworkHost"/>
-        </zeroOrMore>
-      </interleave>
+      <attribute name="protocol">
+        <choice>
+          <value>nbd</value>
+        </choice>
+      </attribute>
+      <optional>
+        <attribute name="name"/>
+      </optional>
+      <ref name="diskSourceNetworkHost"/>
+    </element>
+  </define>
+
+  <define name="diskSourceNetworkProtocolGluster">
+    <element name="source">
+      <attribute name="protocol">
+        <choice>
+          <value>gluster</value>
+        </choice>
+      </attribute>
+      <attribute name="name"/>
+      <oneOrMore>
+        <ref name="diskSourceNetworkHost"/>
+      </oneOrMore>
     </element>
   </define>
 
       <value>network</value>
     </attribute>
     <choice>
-      <ref name="diskSourceNetworkProtocolGeneric"/>
+      <ref name="diskSourceNetworkProtocolNBD"/>
+      <ref name="diskSourceNetworkProtocolGluster"/>
       <ref name="diskSourceNetworkProtocolRBD"/>
       <ref name="diskSourceNetworkProtocolHTTP"/>
       <ref name="diskSourceNetworkProtocolSimple"/>