From 60d87b704e7cb1251da46e825033eb3d35311ae2 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 23 Jan 2013 12:14:57 +0100 Subject: python: Fix bindings for virDomainSnapshotGet{Domain,Connect} 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 --- libvirt-override-virDomainSnapshot.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libvirt-override-virDomainSnapshot.py') diff --git a/libvirt-override-virDomainSnapshot.py b/libvirt-override-virDomainSnapshot.py index 3da7bfd..bf708a5 100644 --- a/libvirt-override-virDomainSnapshot.py +++ b/libvirt-override-virDomainSnapshot.py @@ -1,3 +1,11 @@ + def getConnect(self): + """Get the connection that owns the domain that a snapshot was created for""" + return self.connect() + + def getDomain(self): + """Get the domain that a snapshot was created for""" + return self.domain() + def listAllChildren(self, flags): """List all child snapshots and returns a list of snapshot objects""" ret = libvirtmod.virDomainSnapshotListAllChildren(self._o, flags) -- cgit