diff options
author | Peter Krempa <pkrempa@redhat.com> | 2023-05-15 14:28:06 +0200 |
---|---|---|
committer | Peter Krempa <pkrempa@redhat.com> | 2023-05-16 10:26:33 +0200 |
commit | 9884e89236374a4f94382d99451dbc9208d78a29 (patch) | |
tree | c50f13b6a41e0a278d95acfe6f1a07a2eafcdd61 | |
parent | 1222ada2afe62279ce4c8844694b3cb756ddd60b (diff) | |
download | libvirt-9884e89236374a4f94382d99451dbc9208d78a29.tar.gz |
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>
-rw-r--r-- | src/conf/schemas/domainbackup.rng | 4 | ||||
-rw-r--r-- | tests/domainbackupxml2xmlin/backup-push.xml | 2 | ||||
-rw-r--r-- | tests/domainbackupxml2xmlout/backup-push.xml | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/conf/schemas/domainbackup.rng b/src/conf/schemas/domainbackup.rng index bfc29a6c06..80ba155aad 100644 --- a/src/conf/schemas/domainbackup.rng +++ b/src/conf/schemas/domainbackup.rng @@ -166,6 +166,10 @@ <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"> diff --git a/tests/domainbackupxml2xmlin/backup-push.xml b/tests/domainbackupxml2xmlin/backup-push.xml index a95833d407..f1cb38fa82 100644 --- a/tests/domainbackupxml2xmlin/backup-push.xml +++ b/tests/domainbackupxml2xmlin/backup-push.xml @@ -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> diff --git a/tests/domainbackupxml2xmlout/backup-push.xml b/tests/domainbackupxml2xmlout/backup-push.xml index fff7db716b..0c6fa6d4ee 100644 --- a/tests/domainbackupxml2xmlout/backup-push.xml +++ b/tests/domainbackupxml2xmlout/backup-push.xml @@ -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> |