summaryrefslogtreecommitdiffstats
path: root/libvirt-override-virConnect.py
diff options
context:
space:
mode:
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r--libvirt-override-virConnect.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py
index 87a737f..85db5fe 100644
--- a/libvirt-override-virConnect.py
+++ b/libvirt-override-virConnect.py
@@ -218,3 +218,15 @@
retlist.append(virStoragePool(self, _obj=poolptr))
return retlist
+
+ def listAllNetworks(self, flags):
+ """Returns a list of network objects"""
+ ret = libvirtmod.virConnectListAllNetworks(self._o, flags)
+ if ret is None:
+ raise libvirtError("virConnectListAllNetworks() failed", conn=self)
+
+ retlist = list()
+ for netptr in ret:
+ retlist.append(virNetwork(self, _obj=netptr))
+
+ return retlist