]> xenbits.xensource.com Git - libvirt.git/commit
Fix up the python bindings for snapshotting.
authorChris Lalancette <clalance@redhat.com>
Wed, 19 May 2010 13:02:30 +0000 (09:02 -0400)
committerChris Lalancette <clalance@redhat.com>
Thu, 20 May 2010 17:49:38 +0000 (13:49 -0400)
commit8749256d0bc0bd3aed3ad4f8455e6361eee77fd8
tree7068a6fa9e95aa3d127cc0e98666a0ff5cb238e9
parent20beb0c0db37f32c502f5e242bd82169a55ced6e
Fix up the python bindings for snapshotting.

This involved a few fixes.  To start with,
an virDomainSnapshot object is really tied to a
domain, not a connection, so we have to generate
a slightly different object so that we can get
at self._dom for the object.

Next, we had to "dummy" up an override piece of
XML with a bogus argument that the function doesn't
actually take.  That's so that the generator places
virDomainRevertToSnapshot underneath the correct
class (namely, the virDomain class).

Finally, we had to hand-implement the
virDomainRevertToSnapshot implementation, ignoring the
bogus pointer we are being passed.

With all of this in place, I was able to successfully
take a snapshot and revert to it using only the
Python bindings.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
python/generator.py
python/libvirt-override-api.xml
python/libvirt-override.c