mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-25 04:58:57 +03:00
:%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>
8 lines
396 B
Python
8 lines
396 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")
|
|
|
|
return [virStorageVol(self._conn, _obj=volptr) for volptr in ret]
|