diff options
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r-- | libvirt-override-virConnect.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py index ffa1a3c..0859c36 100644 --- a/libvirt-override-virConnect.py +++ b/libvirt-override-virConnect.py @@ -242,3 +242,15 @@ retlist.append(virInterface(self, _obj=ifaceptr)) return retlist + + def listAllDevices(self, flags): + """Returns a list of host node device objects""" + ret = libvirtmod.virConnectListAllNodeDevices(self._o, flags) + if ret is None: + raise libvirtError("virConnectListAllNodeDevices() failed", conn=self) + + retlist = list() + for devptr in ret: + retlist.append(virNodeDevice(self, _obj=devptr)) + + return retlist |