diff options
author | Philip Hahn <hahn@univention.de> | 2010-03-17 12:34:04 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2010-03-17 12:34:04 -0400 |
commit | 42008501952c63609a29717e9695f308a339f61a (patch) | |
tree | 767359a129da9a1a3a7d5e48587628ccb05f1dee /generator.py | |
parent | 26f853e45d859555394efb3042bd7fc09bb5ef53 (diff) | |
download | libvirt-python-split-42008501952c63609a29717e9695f308a339f61a.tar.gz libvirt-python-split-42008501952c63609a29717e9695f308a339f61a.tar.xz libvirt-python-split-42008501952c63609a29717e9695f308a339f61a.zip |
python: Fix networkLookupByUUID
According to:
http://libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByUUID
virNetworkLookupByUUID() expects a virConnectPtr as its first argument,
thus making it a method of the virConnect Python class.
Currently it's a method of libvirt.virNetwork.
@@ -805,13 +805,6 @@ class virNetwork:
if ret == -1: raise libvirtError ('virNetworkGetAutostart() failed', net=self)
return ret
- def networkLookupByUUID(self, uuid):
- """Try to lookup a network on the given hypervisor based on its UUID. """
- ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
- if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', net=self)
- __tmp = virNetwork(self, _obj=ret)
- return __tmp
-
class virInterface:
def __init__(self, conn, _obj=None):
self._conn = conn
@@ -1689,6 +1682,13 @@ class virConnect:
__tmp = virDomain(self,_obj=ret)
return __tmp
+ def networkLookupByUUID(self, uuid):
+ """Try to lookup a network on the given hypervisor based on its UUID. """
+ ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
+ if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', conn=self)
+ __tmp = virNetwork(self, _obj=ret)
+ return __tmp
+
Diffstat (limited to 'generator.py')
0 files changed, 0 insertions, 0 deletions