]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: Factor out post-parse code
authorEric Blake <eblake@redhat.com>
Mon, 15 Apr 2019 22:25:52 +0000 (17:25 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 17 Apr 2019 02:55:59 +0000 (21:55 -0500)
commit5ba4d81ce91eb6e075f5c9114812c46e92d0e2d9
tree49152cc59f2ee84a37997b95228c1e15c0f093e0
parenta007fcab3b9b760db5fc1ffee7ed75398a5d3125
snapshot: Factor out post-parse code

Move the non-deterministic code that sets snapshot properties
independently of what the incoming XML described to instead live in a
default post-parse function common to virDomainMoment (as checkpoints
will also reuse it in later patches). This patch is just code motion,
with no difference to any callers; but the next patch will further
refactor things to allow for a per-driver override, used by the
testsuite to perform deterministic post-parse actions for better
coverage of parser/formatter code.

Note that the post-parse code is intentionally not run during a
snapshot redefine, since that code path already requires a valid
snapshot name and creation time from the XML.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/conf/moment_conf.c
src/conf/moment_conf.h
src/conf/snapshot_conf.c