]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: schemas: Extract RBD-specific data
authorPeter Krempa <pkrempa@redhat.com>
Fri, 21 Apr 2017 09:48:12 +0000 (11:48 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 28 Apr 2017 07:48:26 +0000 (09:48 +0200)
RBD driver supports specifying a snapshot image name or config file.
Create a define for RBD and move the specifics there.

docs/schemas/domaincommon.rng

index 89dbae3f701d0d53accbd4dab682b1afcbf77b82..add2910652e0f98d965ec5d7ccd31ade59fa829c 100644 (file)
     </element>
   </define>
 
-  <define name="diskSourceNetwork">
-    <attribute name="type">
-      <value>network</value>
-    </attribute>
+  <define name="diskSourceNetworkProtocolRBD">
     <element name="source">
       <interleave>
         <attribute name="protocol">
           <choice>
-            <value>nbd</value>
             <value>rbd</value>
-            <value>sheepdog</value>
-            <value>gluster</value>
-            <value>iscsi</value>
-            <value>http</value>
-            <value>https</value>
-            <value>ftp</value>
-            <value>ftps</value>
-            <value>tftp</value>
           </choice>
         </attribute>
         <optional>
     </element>
   </define>
 
+  <define name="diskSourceNetworkProtocolGeneric">
+    <element name="source">
+      <interleave>
+        <attribute name="protocol">
+          <choice>
+            <value>nbd</value>
+            <value>sheepdog</value>
+            <value>gluster</value>
+            <value>iscsi</value>
+            <value>http</value>
+            <value>https</value>
+            <value>ftp</value>
+            <value>ftps</value>
+            <value>tftp</value>
+          </choice>
+        </attribute>
+        <optional>
+          <attribute name="name"/>
+        </optional>
+        <zeroOrMore>
+          <ref name="diskSourceNetworkHost"/>
+        </zeroOrMore>
+      </interleave>
+    </element>
+  </define>
+
+  <define name="diskSourceNetwork">
+    <attribute name="type">
+      <value>network</value>
+    </attribute>
+    <choice>
+      <ref name="diskSourceNetworkProtocolGeneric"/>
+      <ref name="diskSourceNetworkProtocolRBD"/>
+    </choice>
+  </define>
+
   <define name="diskSourceVolume">
     <attribute name="type">
       <value>volume</value>