libvirt/tests/qemuxml2xmloutdata
Eric Blake 7c6fc3948e conf: alter disk mirror xml output
Now that we track a disk mirror as a virStorageSource, we might
as well update the XML to theoretically allow any type of
mirroring destination (not just a local file).  A later patch
will also be reusing <mirror> to track the block commit of the
top layer of a chain, which is another case where libvirt needs
to update the backing chain after the job is finally pivoted,
and since backing chains can have network backing files as the
destination to commit into, it makes more sense to display that
in the XML.

This patch changes output-only XML; it was already documented
that <mirror> does not affect a domain definition at this point
(because qemu doesn't provide persistent bitmaps yet).  Any
application that was starting a block copy job with older libvirt
and then relying on the domain XML to determine if it was
complete will no longer be able to access the file= and format=
attributes of mirror that were previously used.  However, this is
not going to be a problem in practice: the only time a block copy
job works is on a transient domain, and any app that is managing
a transient domain probably already does enough of its own
bookkeeping to know which file it is mirroring into without
having to re-read it from the libvirt XML.  The one thing that
was likely to be used in a mirroring job was the ready=
attribute, which is unchanged.  Meanwhile, I made sure the schema
and parser still accept the old format, even if we no longer
output it, so that upgrading from an older version of libvirt is
seamless.

* docs/schemas/domaincommon.rng (diskMirror): Alter definition.
* src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
styles of mirror elements.
(virDomainDiskDefFormat): Output new style.
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
file, copied from...
* tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
before modernizing.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
files.
* tests/qemuxml2xmltest.c (mymain): Test both styles.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-06-06 11:48:09 -06:00
..
qemuxml2xmlout-balloon-device-auto.xml conf: Swap order of AddImplicitControllers and DomainDefPostParse 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-channel-virtio-auto.xml conf: Swap order of AddImplicitControllers and DomainDefPostParse 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-console-compat-auto.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-console-virtio.xml conf: Swap order of AddImplicitControllers and DomainDefPostParse 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-disk-backing-chains-active.xml tests: Test backing store XML formatting and parsing 2014-04-24 16:07:56 +02:00
qemuxml2xmlout-disk-backing-chains-inactive.xml tests: Test backing store XML formatting and parsing 2014-04-24 16:07:56 +02:00
qemuxml2xmlout-disk-drive-discard.xml conf: fix omission of <driver> in domain dumpxml 2014-04-16 10:49:07 +02:00
qemuxml2xmlout-disk-mirror-old-inactive.xml conf: alter disk mirror xml output 2014-06-06 11:48:09 -06:00
qemuxml2xmlout-disk-mirror-old.xml conf: alter disk mirror xml output 2014-06-06 11:48:09 -06:00
qemuxml2xmlout-disk-mirror.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-disk-scsi-device-auto.xml conf: Swap order of AddImplicitControllers and DomainDefPostParse 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-disk-source-pool.xml conf: better <disk> interleaving in schema 2014-04-15 11:45:02 +02:00
qemuxml2xmlout-graphics-listen-network2.xml conf: Add keyboard input device type 2014-02-19 09:16:31 +01:00
qemuxml2xmlout-graphics-spice-timeout.xml conf: Add keyboard input device type 2014-02-19 09:16:31 +01:00
qemuxml2xmlout-hostdev-scsi-autogen-address.xml conf: Generate address for scsi host device automatically 2013-06-01 10:00:23 +08:00
qemuxml2xmlout-memtune-unlimited.xml conf: don't format memtune with unlimited values 2013-12-10 09:11:26 +01:00
qemuxml2xmlout-memtune.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-metadata.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-pci-autoadd-addr.xml qemu: auto-add bridges and allow using them 2013-04-25 13:19:40 +02:00
qemuxml2xmlout-pci-autoadd-idx.xml qemu: auto-add bridges and allow using them 2013-04-25 13:19:40 +02:00
qemuxml2xmlout-pci-bridge-many-disks.xml qemu: set/validate slot/connection type when assigning slots for PCI devices 2013-07-24 06:45:07 -04:00
qemuxml2xmlout-pcie-root.xml qemu: fix handling of default/implicit devices for q35 2013-08-05 15:47:49 -04:00
qemuxml2xmlout-pcihole64-gib.xml Add pcihole64 element to root PCI controllers 2013-08-27 17:42:29 +02:00
qemuxml2xmlout-q35.xml qemu: enable using implicit sata controller in q35 machines 2013-08-06 13:37:36 -04:00
qemuxml2xmlout-s390-defaultconsole.xml S390: Testcase for console default target type (virtio) 2013-06-28 09:52:00 +02:00
qemuxml2xmlout-seclabel-dynamic-labelskip.xml selinux: distinguish failure to label from request to avoid label 2013-08-20 10:39:03 -06:00
qemuxml2xmlout-serial-target-port-auto.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00
qemuxml2xmlout-usb-ich9-ehci-addr.xml qemu: auto-add pci-root controller for pc machine types 2013-04-25 13:05:10 +02:00