summaryrefslogtreecommitdiff
path: root/tests/domainbackupxml2xmlin/backup-push-seclabel.xml
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2019-08-21 20:42:41 -0500
committerPeter Krempa <pkrempa@redhat.com>2019-12-10 12:41:56 +0100
commit252958ee16a9eefc2b55ce1be7af34ba8c84452e (patch)
tree73dd7c813fd53a6585baaaf8535cbdf292fd9d7f /tests/domainbackupxml2xmlin/backup-push-seclabel.xml
parentc3e18c13ca26b792855610f335d3dcf3859de4c1 (diff)
downloadlibvirt-252958ee16a9eefc2b55ce1be7af34ba8c84452e.tar.gz
backup: Document new XML for backups
Prepare for new backup APIs by describing the XML that will represent a backup. The XML resembles snapshots and checkpoints in being able to select actions for a set of disks, but has other differences. It can support both push model (the hypervisor does the backup directly into the destination file) and pull model (the hypervisor exposes an access port for a third party to grab what is necessary). Add testsuite coverage for some minimal uses of the XML. The <disk> element within <domainbackup> tries to model the same elements as a <disk> under <domain>, but sharing the RNG grammar proved to be hairy. That is in part because while <domain> use <source> to describe a host resource in use by the guest, a backup job is using a host resource that is not visible to the guest: a push backup action is instead describing a <target> (which ultimately could be a remote network resource, but for simplicity the RNG just validates a local file for now), and a pull backup action is instead describing a temporary local file <scratch> (which probably should not be a remote resource). A future refactoring may thus introduce some way to parameterize RNG to accept <disk type='FOO'>...</disk> so that the name of the subelement can be <source> for domain, or <target> or <scratch> as needed for backups. Future patches may improve this area of code. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'tests/domainbackupxml2xmlin/backup-push-seclabel.xml')
-rw-r--r--tests/domainbackupxml2xmlin/backup-push-seclabel.xml17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/domainbackupxml2xmlin/backup-push-seclabel.xml b/tests/domainbackupxml2xmlin/backup-push-seclabel.xml
new file mode 100644
index 0000000000..dbaf7f8e7c
--- /dev/null
+++ b/tests/domainbackupxml2xmlin/backup-push-seclabel.xml
@@ -0,0 +1,17 @@
+<domainbackup mode="push">
+ <incremental>1525889631</incremental>
+ <disks>
+ <disk name='vda' type='file'>
+ <driver type='raw'/>
+ <target file='/path/to/file'>
+ <seclabel model='dac' relabel='no'/>
+ </target>
+ </disk>
+ <disk name='vdb' type='block'>
+ <driver type='qcow2'/>
+ <target dev='/dev/block'>
+ <seclabel model='dac' relabel='no'/>
+ </target>
+ </disk>
+ </disks>
+</domainbackup>