]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schema: make source optional in volume XML
authorJán Tomko <jtomko@redhat.com>
Thu, 16 May 2013 13:43:06 +0000 (15:43 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 17 May 2013 06:35:08 +0000 (08:35 +0200)
We don't parse it anyway.

https://bugzilla.redhat.com/show_bug.cgi?id=893273

docs/schemas/storagevol.rng
tests/Makefile.am
tests/storagevolschemadata/qcow2-no-source.xml [new file with mode: 0644]
tests/storagevolschematest

index ca8ce56ebd180a8a647a368a126320bb14ba620f..4649d9151f67a2facccc3e4adbcc6f1ba8b6db20 100644 (file)
@@ -20,7 +20,9 @@
           <text/>
         </element>
       </optional>
-      <ref name='source'/>
+      <optional>
+        <ref name='source'/>
+      </optional>
       <ref name='sizing'/>
       <ref name='target'/>
       <optional>
index 04b76ba0d351b6926302faa6d9887adec4b272ae..2140d9ddf0a632eb399c105a6ca478185aafd2ce 100644 (file)
@@ -78,6 +78,7 @@ EXTRA_DIST =          \
        storagepoolxml2xmlin \
        storagepoolxml2xmlout \
        storagevolxml2argvdata \
+       storagevolschemadata \
        storagevolschematest \
        storagevolxml2xmlin \
        storagevolxml2xmlout \
diff --git a/tests/storagevolschemadata/qcow2-no-source.xml b/tests/storagevolschemadata/qcow2-no-source.xml
new file mode 100644 (file)
index 0000000..777294e
--- /dev/null
@@ -0,0 +1,29 @@
+<volume>
+  <name>OtherDemo.img</name>
+  <key>/var/lib/libvirt/images/OtherDemo.img</key>
+  <capacity unit="G">5</capacity>
+  <allocation>294912</allocation>
+  <target>
+    <path>/var/lib/libvirt/images/OtherDemo.img</path>
+    <format type='qcow2'/>
+    <permissions>
+      <mode>0644</mode>
+      <owner>0</owner>
+      <group>0</group>
+      <label>unconfined_u:object_r:virt_image_t:s0</label>
+    </permissions>
+    <encryption format='qcow'>
+      <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
+    </encryption>
+  </target>
+  <backingStore>
+    <path>/dev/null</path>
+    <format type='raw'/>
+    <permissions>
+      <mode>0644</mode>
+      <owner>0</owner>
+      <group>0</group>
+      <label>unconfined_u:object_r:virt_image_t:s0</label>
+    </permissions>
+  </backingStore>
+</volume>
index e1afa8dd9cfbe29777ee37004f6e82396f9ce745..9045e6b4143e271ab8e5f9e9ca44d800b8f16fc7 100755 (executable)
@@ -4,7 +4,7 @@
 . $srcdir/test-lib.sh
 . $abs_srcdir/schematestutils.sh
 
-DIRS="storagevolxml2xmlin storagevolxml2xmlout"
+DIRS="storagevolxml2xmlin storagevolxml2xmlout storagevolschemadata"
 SCHEMA="storagevol.rng"
 
 check_schema "$DIRS" "$SCHEMA"