diff options
Diffstat (limited to 'libvirt-override-virNetwork.py')
-rw-r--r-- | libvirt-override-virNetwork.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libvirt-override-virNetwork.py b/libvirt-override-virNetwork.py new file mode 100644 index 0000000..749ee44 --- /dev/null +++ b/libvirt-override-virNetwork.py @@ -0,0 +1,11 @@ + def listAllPorts(self, flags=0): + """List all domains and returns a list of domain 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)) + + return retlist |