summaryrefslogtreecommitdiff
path: root/libvirt-override-virDomainCheckpoint.py
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2019-02-07 16:36:16 -0600
committerEric Blake <eblake@redhat.com>2019-07-29 13:39:39 -0500
commit358a8640fa03b6d79645d1794e28a4259bea7ec3 (patch)
treed3761aa580c5c875a828658f2c082c5e31bbc3af /libvirt-override-virDomainCheckpoint.py
parent5e9d1aa7facb9e5ff77fbdf8509a965364ed3630 (diff)
downloadlibvirt-python-358a8640fa03b6d79645d1794e28a4259bea7ec3.tar.gz
Add virDomainCheckpoint APIs
Copies heavily from existing virDomainSnapshot handling, regarding what special cases the generator has to be taught and what overrides need to be written. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'libvirt-override-virDomainCheckpoint.py')
-rw-r--r--libvirt-override-virDomainCheckpoint.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/libvirt-override-virDomainCheckpoint.py b/libvirt-override-virDomainCheckpoint.py
new file mode 100644
index 0000000..371b0fd
--- /dev/null
+++ b/libvirt-override-virDomainCheckpoint.py
@@ -0,0 +1,19 @@
+ def getConnect(self):
+ """Get the connection that owns the domain that a checkpoint was created for"""
+ return self.connect()
+
+ def getDomain(self):
+ """Get the domain that a checkpoint was created for"""
+ return self.domain()
+
+ def listAllChildren(self, flags=0):
+ """List all child checkpoints and returns a list of checkpoint objects"""
+ ret = libvirtmod.virDomainCheckpointListAllChildren(self._o, flags)
+ if ret is None:
+ raise libvirtError("virDomainCheckpointListAllChildren() failed", conn=self)
+
+ retlist = list()
+ for chkptr in ret:
+ retlist.append(virDomainCheckpoint(self, _obj=chkptr))
+
+ return retlist