mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2024-10-26 07:55:06 +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>
8 lines
381 B
Python
8 lines
381 B
Python
def listAllPorts(self, flags: int = 0) -> List['virNetworkPort']:
|
|
"""List all ports on the network and returns a list of network port objects"""
|
|
ret = libvirtmod.virNetworkListAllPorts(self._o, flags)
|
|
if ret is None:
|
|
raise libvirtError("virNetworkListAllPorts() failed")
|
|
|
|
return [virNetworkPort(self, _obj=domptr) for domptr in ret]
|