1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-18 04:59:33 +03:00
Files
libvirt-python/libvirt-override-virDomainSnapshot.py
Philipp Hahn abbd47f4ea override: Add manual PEP 484 type annotations
Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-08-18 09:48:25 +00:00

20 lines
771 B
Python

def getConnect(self) -> 'virConnect':
"""Get the connection that owns the domain that a snapshot was created for"""
return self.connect()
def getDomain(self) -> 'virDomain':
"""Get the domain that a snapshot was created for"""
return self.domain()
def listAllChildren(self, flags: int = 0) -> List['virDomainSnapshot']:
"""List all child snapshots and returns a list of snapshot objects"""
ret = libvirtmod.virDomainSnapshotListAllChildren(self._o, flags)
if ret is None:
raise libvirtError("virDomainSnapshotListAllChildren() failed")
retlist = list()
for snapptr in ret:
retlist.append(virDomainSnapshot(self.domain(), _obj=snapptr))
return retlist