1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-19 08:59:33 +03:00
Files
libvirt-python/libvirt-override-virStoragePool.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

12 lines
465 B
Python

def listAllVolumes(self, flags: int = 0) -> List['virStorageVol']:
"""List all storage volumes and returns a list of storage volume objects"""
ret = libvirtmod.virStoragePoolListAllVolumes(self._o, flags)
if ret is None:
raise libvirtError("virStoragePoolListAllVolumes() failed")
retlist = list()
for volptr in ret:
retlist.append(virStorageVol(self._conn, _obj=volptr))
return retlist