mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2024-10-26 16:25:10 +03:00
5777008197
:%s/retlist = list()\n\s*\(for \w\+ in ret\):\n\s*retlist.append(\(.*\))\n\n\s*return retlist/return [\2 \1]/ Signed-off-by: Philipp Hahn <hahn@univention.de>
16 lines
716 B
Python
16 lines
716 B
Python
def getConnect(self) -> 'virConnect':
|
|
"""Get the connection that owns the domain that a checkpoint was created for"""
|
|
return self.connect()
|
|
|
|
def getDomain(self) -> 'virDomain':
|
|
"""Get the domain that a checkpoint was created for"""
|
|
return self.domain()
|
|
|
|
def listAllChildren(self, flags: int = 0) -> List['virDomainCheckpoint']:
|
|
"""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")
|
|
|
|
return [virDomainCheckpoint(self.domain(), _obj=chkptr) for chkptr in ret]
|