schemas: backup: Allow missing 'type' attribute for backup disk

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>
This commit is contained in:
Peter Krempa 2023-05-15 14:28:06 +02:00
parent 1222ada2af
commit 9884e89236
3 changed files with 12 additions and 0 deletions

View File

@ -166,6 +166,10 @@
<value>no</value> <value>no</value>
</attribute> </attribute>
</group> </group>
<!-- Allow to plainly select a disk for backup without any other config -->
<group>
<ref name="backupAttr"/>
</group>
<group> <group>
<ref name="backupAttr"/> <ref name="backupAttr"/>
<attribute name="type"> <attribute name="type">

View File

@ -6,6 +6,8 @@
<target file='/path/to/file'/> <target file='/path/to/file'/>
</disk> </disk>
<disk name='vdb' type='file' backupmode='full'/> <disk name='vdb' type='file' backupmode='full'/>
<disk name='vdc'/>
<disk name='vdd' backup='yes'/>
<disk name='hda' backup='no'/> <disk name='hda' backup='no'/>
</disks> </disks>
</domainbackup> </domainbackup>

View File

@ -8,6 +8,12 @@
<disk name='vdb' backup='yes' type='file' backupmode='full'> <disk name='vdb' backup='yes' type='file' backupmode='full'>
<target file='/fake/vdb.qcow2.SUFFIX'/> <target file='/fake/vdb.qcow2.SUFFIX'/>
</disk> </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='hda' backup='no'/>
<disk name='vdextradisk' backup='no'/> <disk name='vdextradisk' backup='no'/>
</disks> </disks>