mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-03 08:21:58 +03:00
fix class type instantiated when listing network ports
Reviewed-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
def listAllPorts(self, flags=0):
|
||||
"""List all domains and returns a list of domain objects"""
|
||||
"""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", conn=self)
|
||||
|
||||
retlist = list()
|
||||
for domptr in ret:
|
||||
retlist.append(virNetwork(self, _obj=domptr))
|
||||
retlist.append(virNetworkPort(self, _obj=domptr))
|
||||
|
||||
return retlist
|
||||
|
Reference in New Issue
Block a user