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 811e16b..ecb5680 100644
--- a/libvirt-override-virConnect.py
+++ b/libvirt-override-virConnect.py
@@ -185,3 +185,15 @@
raise libvirtError ('virConnectDomainEventRegisterAny() failed', conn=self)
self.domainEventCallbackID[ret] = opaque
return ret
+
+ def listAllDomains(self, flags):
+ """List all domains and returns a list of domain objects"""
+ ret = libvirtmod.virConnectListAllDomains(self._o, flags)
+ if ret is None:
+ raise libvirtError("virConnectListAllDomains() failed", conn=self)
+
+ retlist = list()
+ for domptr in ret:
+ retlist.append(virDomain(self, _obj=domptr))
+
+ return retlist