]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schemas: backup: Allow missing 'type' attribute for backup disk
authorPeter Krempa <pkrempa@redhat.com>
Mon, 15 May 2023 12:28:06 +0000 (14:28 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 16 May 2023 08:26:33 +0000 (10:26 +0200)
One of our examples in the 'formatbackup.rst' page shows following
config:

  <disk name='vda' backup='yes'/>

The schema didn't allow it though. Fix the schema as the internals were
supposed to support it (except for the bug fixed in previous patches).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/schemas/domainbackup.rng
tests/domainbackupxml2xmlin/backup-push.xml
tests/domainbackupxml2xmlout/backup-push.xml

index bfc29a6c06ea177822042c500d62cc7c24a74104..80ba155aad356f520253fe55fc9c9c182ad379dc 100644 (file)
                   <value>no</value>
                 </attribute>
               </group>
+              <!-- Allow to plainly select a disk for backup without any other config -->
+              <group>
+                <ref name="backupAttr"/>
+              </group>
               <group>
                 <ref name="backupAttr"/>
                 <attribute name="type">
index a95833d407bf3b0f437f4ecd61b52a7852913d5d..f1cb38fa82f290073811860ce592bfead40ecb95 100644 (file)
@@ -6,6 +6,8 @@
       <target file='/path/to/file'/>
     </disk>
     <disk name='vdb' type='file' backupmode='full'/>
+    <disk name='vdc'/>
+    <disk name='vdd' backup='yes'/>
     <disk name='hda' backup='no'/>
   </disks>
 </domainbackup>
index fff7db716b4361511526760afd41e5762b24f05e..0c6fa6d4ee64baf5f420eb76a07d178a228f6a3b 100644 (file)
@@ -8,6 +8,12 @@
     <disk name='vdb' backup='yes' type='file' backupmode='full'>
       <target file='/fake/vdb.qcow2.SUFFIX'/>
     </disk>
+    <disk name='vdc' backup='yes' type='file' backupmode='incremental' incremental='1525889631'>
+      <target file='/fake/vdc.qcow2.SUFFIX'/>
+    </disk>
+    <disk name='vdd' backup='yes' type='file' backupmode='incremental' incremental='1525889631'>
+      <target file='/fake/vdd.qcow2.SUFFIX'/>
+    </disk>
     <disk name='hda' backup='no'/>
     <disk name='vdextradisk' backup='no'/>
   </disks>