summaryrefslogtreecommitdiffstats
path: root/generator.py
diff options
context:
space:
mode:
authorJiri Denemark <jdenemar@redhat.com>2013-01-23 12:14:57 +0100
committerJiri Denemark <jdenemar@redhat.com>2013-06-06 14:06:23 +0200
commit60d87b704e7cb1251da46e825033eb3d35311ae2 (patch)
tree25a3d6ee6a467ff8ce3e885935ab141cf620e922 /generator.py
parent2508c934bc82e40a1b35271e6ad8bcd73c05a73b (diff)
downloadlibvirt-python-v6-60d87b704e7cb1251da46e825033eb3d35311ae2.tar.gz
libvirt-python-v6-60d87b704e7cb1251da46e825033eb3d35311ae2.tar.xz
libvirt-python-v6-60d87b704e7cb1251da46e825033eb3d35311ae2.zip
python: Fix bindings for virDomainSnapshotGet{Domain,Connect}libvirt-0.10.2-22.el6libvirt-0.10.2-21.el6libvirt-0.10.2-20.el6libvirt-0.10.2-19.el6
https://bugzilla.redhat.com/show_bug.cgi?id=895882 virDomainSnapshot.getDomain() and virDomainSnapshot.getConnect() wrappers around virDomainSnapshotGet{Domain,Connect} were not supposed to be ever implemented. The class should contain proper domain() and connect() accessors that fetch python objects stored internally within the class. While domain() was already provided, connect() was missing. This patch adds connect() method to virDomainSnapshot class and reimplements getDomain() and getConnect() methods as aliases to domain() and connect() for backward compatibility. (cherry picked from commit 7b35fd718d2156224797ace08f752dfbb9884520) Conflicts: python/generator.py -- context
Diffstat (limited to 'generator.py')
-rwxr-xr-xgenerator.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/generator.py b/generator.py
index a98a894..9096f9e 100755
--- a/generator.py
+++ b/generator.py
@@ -497,6 +497,8 @@ skip_function = (
"virNWFilterGetConnect",
"virStoragePoolGetConnect",
"virStorageVolGetConnect",
+ "virDomainSnapshotGetConnect",
+ "virDomainSnapshotGetDomain",
)
qemu_skip_function = (
@@ -877,7 +879,6 @@ classes_destructors = {
class_skip_connect_impl = {
"virConnect" : True,
- "virDomainSnapshot": True,
}
class_domain_impl = {
@@ -1358,6 +1359,7 @@ def buildWrappers(module):
" self._conn = conn._conn\n")
elif classname in [ "virDomainSnapshot" ]:
classes.write(" self._dom = dom\n")
+ classes.write(" self._conn = dom.connect()\n")
classes.write(" if _obj != None:self._o = _obj;return\n")
classes.write(" self._o = None\n\n");
destruct=None