libvirt/docs/schemas
Eric Blake a007fcab3b snapshot: Don't expose testsuite-only state in snapshot XML
None of the existing drivers actually use the 0-valued 'nostate'
snapshot state; rather, it was a fluke of implementation. In fact,
some drivers, like qemu, actively reject 'nostate' as invalid during a
snapshot redefine. Normally, a driver computes the state post-parse
from the current domain, and thus virDomainSnapshotGetXMLDesc() will
never expose the state. However, since the testsuite lacks any
associated domain to copy state from, and lacks post-parse processing
that normal drivers have, the testsuite output had several spots with
the state, coupled with a regex filter to ignore the oddity.

It is better to follow the lead of other XML defaults, by not
outputting anything during format if post-parse defaults have not been
applied, and rejecting the default value during parsing. The testsuite
needs a bit of an update, by adding another flag for when to simulate
a post-parse action of setting a snapshot state, but none of the
drivers are impacted other than rejecting XML that was previously
already suspicious in nature.

Similarly, don't expose creation time 0 (for now, only possible if a
user redefined a snapshot to claim creation at the Epoch, but also
happens once setting the creation time is deferred to a post-parse
handler).

This is also a step towards cleaning up snapshot_conf.c to separate
its existing post-parse work (namely, setting the creationTime and
default snapshot name) from the pure parsing work, so that we can get
rid of the testsuite hack of regex filtering of the XML and instead
have more accurate testing of our parser/formatter code.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-16 21:55:52 -05:00
..
basictypes.rng network: allow configuring firewalld zone for virtual network bridge device 2019-02-01 12:57:13 -05:00
capability.rng Drop UML driver 2018-12-17 17:52:46 +01:00
cputypes.rng
domain.rng
domaincaps.rng domain capabilities: Expose firmware auto selection feature 2019-04-10 13:58:51 +02:00
domaincommon.rng conf: Add support for emulatorsched 2019-04-16 13:46:17 +02:00
domainsnapshot.rng snapshot: Don't expose testsuite-only state in snapshot XML 2019-04-16 21:55:52 -05:00
interface.rng
network.rng network: allow configuring firewalld zone for virtual network bridge device 2019-02-01 12:57:13 -05:00
networkcommon.rng
nodedev.rng xml: nodedev: make pci capability class element optional 2019-03-22 12:59:56 +03:00
nwfilter_params.rng
nwfilter.rng
nwfilterbinding.rng
secret.rng
storagecommon.rng storage: optional 'refresh' elemement on pool 2019-03-19 16:46:21 +01:00
storagepool.rng storage: optional 'refresh' elemement on pool 2019-03-19 16:46:21 +01:00
storagepoolcaps.rng docs: Add schema for storage pool capabilities 2019-03-06 11:12:48 -05:00
storagevol.rng docs: schemas: Fix missing timestamp inside backingStore 2018-09-11 10:44:26 +02:00