]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: Factor out virDomainMomentDef class
authorEric Blake <eblake@redhat.com>
Fri, 22 Mar 2019 02:02:19 +0000 (21:02 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 22 Mar 2019 06:18:34 +0000 (01:18 -0500)
commitffc0fbebe2e4651c70eeb7a472ea64abe9327e90
tree08e742b1490bde453514cf3344b085e51dfaead1
parentde80cdbcc99082951a2875f8710078df67116ffd
snapshot: Factor out virDomainMomentDef class

Pull out the common parts of virDomainSnapshotDef that will be reused
for virDomainCheckpointDef into a new base class.  Adjust all callers
that use the direct fields (some of it is churn that disappears when
the next patch refactors virDomainSnapshotObj; oh well...).

Someday, I hope to switch this type to be a subclass of virObject, but
that requires a more thorough audit of cleanup paths, and besides
minimal incremental changes are easier to review.

As for the choice of naming:
I promised my teenage daughter Evelyn that I'd give her credit for her
contribution to this commit. I asked her "What would be a good name
for a base class for DomainSnapshot and DomainCheckpoint". After
explaining what a base class was (using the classic OOB Square and
Circle inherit from Shape), she came up with "DomainMoment", which is
way better than my initial thought of "DomainPointInTime" or
"DomainPIT".

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
14 files changed:
src/conf/Makefile.inc.am
src/conf/moment_conf.c [new file with mode: 0644]
src/conf/moment_conf.h [new file with mode: 0644]
src/conf/snapshot_conf.c
src/conf/snapshot_conf.h
src/conf/virconftypes.h
src/conf/virdomainsnapshotobj.c
src/conf/virdomainsnapshotobjlist.c
src/esx/esx_driver.c
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_driver.c
src/test/test_driver.c
src/vbox/vbox_common.c