summaryrefslogtreecommitdiffstats
path: root/libvirt-override.c
diff options
context:
space:
mode:
authorDave Allan <dallan@redhat.com>2010-06-10 20:53:59 +0000
committerDave Allan <dallan@redhat.com>2010-06-10 20:53:59 +0000
commite577043fd03c79e2755bf9d13f7117c170ce203c (patch)
treea5376fbd365dbd90d513896d3f21563ee7e9ca7c /libvirt-override.c
parenta169123ed60bbb8aa9adb9640525f2df54da32ca (diff)
downloadlibvirt-python-v6-libvirt-0.8.1-8.el6.tar.gz
libvirt-python-v6-libvirt-0.8.1-8.el6.tar.xz
libvirt-python-v6-libvirt-0.8.1-8.el6.zip
- Ensure virtio serial has stable addressing - Resolves: rhbz#586665 - SELinux socket labelling on QEMU monitor socket for MLS - Resolves: rhbz#593739 - Fix enumeration of partitions in disks with a trailing digit in path - Resolves: rhbz#593785 - Enable probing of VPC disk format type - Resolves: rhbz#597981 - Delete UNIX domain sockets upon daemon shutdown - Resolves: rhbz#598163 - Fix Migration failure 'canonical hostname pointed to localhost' - Resolves: rhbz#589864 - Fix up the python bindings for snapshotting - Resolves: rhbz#591839 - Sanitize pool target paths - Resolves: rhbz#593565 - Prevent host network conflicts - Resolves: rhbz#594494 - Support 802.1Qbg and bh (vnlink/VEPA) (refresh) - Resolves: rhbz#590110
Diffstat (limited to 'libvirt-override.c')
-rw-r--r--libvirt-override.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index b97445b..cef5c65 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -988,6 +988,28 @@ libvirt_virDomainSnapshotListNames(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
+libvirt_virDomainRevertToSnapshot(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args) {
+ int c_retval;
+ virDomainSnapshotPtr snap;
+ PyObject *pyobj_snap;
+ PyObject *pyobj_dom;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:virDomainRevertToSnapshot", &pyobj_dom, &pyobj_snap, &flags))
+ return(NULL);
+ snap = (virDomainSnapshotPtr) PyvirDomainSnapshot_Get(pyobj_snap);
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ c_retval = virDomainRevertToSnapshot(snap, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+ if (c_retval < 0)
+ return VIR_PY_INT_FAIL;
+
+ return PyInt_FromLong(c_retval);
+}
+
+static PyObject *
libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
int c_retval;
@@ -3527,6 +3549,7 @@ static PyMethodDef libvirtMethods[] = {
{(char *) "virConnectBaselineCPU", libvirt_virConnectBaselineCPU, METH_VARARGS, NULL},
{(char *) "virDomainGetJobInfo", libvirt_virDomainGetJobInfo, METH_VARARGS, NULL},
{(char *) "virDomainSnapshotListNames", libvirt_virDomainSnapshotListNames, METH_VARARGS, NULL},
+ {(char *) "virDomainRevertToSnapshot", libvirt_virDomainRevertToSnapshot, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}
};