[libvirt] [PATCH 1/3] snapshot: schema: Split out snapshot disk driver definition

Peter Krempa pkrempa at redhat.com
Fri Dec 6 14:47:27 UTC 2013


Extract the definition to a new type to allow avoiding of duplication.
---
 docs/schemas/domainsnapshot.rng | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/docs/schemas/domainsnapshot.rng b/docs/schemas/domainsnapshot.rng
index 7b46df1..169fcfb 100644
--- a/docs/schemas/domainsnapshot.rng
+++ b/docs/schemas/domainsnapshot.rng
@@ -124,16 +124,7 @@
             </attribute>
           </optional>
           <interleave>
-            <optional>
-              <element name='driver'>
-                <optional>
-                  <attribute name='type'>
-                    <ref name='storageFormat'/>
-                  </attribute>
-                </optional>
-                <empty/>
-              </element>
-            </optional>
+            <ref name='disksnapshotdriver'/>
             <optional>
               <element name='source'>
                 <optional>
@@ -150,4 +141,17 @@
     </element>
   </define>

+  <define name='disksnapshotdriver'>
+    <optional>
+      <element name='driver'>
+        <optional>
+          <attribute name='type'>
+            <ref name='storageFormat'/>
+          </attribute>
+        </optional>
+        <empty/>
+      </element>
+    </optional>
+  </define>
+
 </grammar>
-- 
1.8.4.3




More information about the libvir-list mailing list