summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:47:31 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:47:31 +0100
commit8c3b820c2b687345448e3d74a7101b07ff32688e (patch)
tree0cf5be9515ddcaa1ef6e74c2c55fca5760400c1c /python
parent632012e6419f04fab93909f92ecbab5a2c590447 (diff)
downloadlibguestfs-8c3b820c2b687345448e3d74a7101b07ff32688e.tar.gz
libguestfs-8c3b820c2b687345448e3d74a7101b07ff32688e.tar.xz
libguestfs-8c3b820c2b687345448e3d74a7101b07ff32688e.zip
Generated code for ping-daemon command.
Diffstat (limited to 'python')
-rw-r--r--python/guestfs-py.c25
-rw-r--r--python/guestfs.py9
2 files changed, 34 insertions, 0 deletions
diff --git a/python/guestfs-py.c b/python/guestfs-py.c
index dd9f4ca3..6a807e3e 100644
--- a/python/guestfs-py.c
+++ b/python/guestfs-py.c
@@ -3205,6 +3205,30 @@ py_guestfs_dmesg (PyObject *self, PyObject *args)
return py_r;
}
+static PyObject *
+py_guestfs_ping_daemon (PyObject *self, PyObject *args)
+{
+ PyObject *py_g;
+ guestfs_h *g;
+ PyObject *py_r;
+ int r;
+
+ if (!PyArg_ParseTuple (args, (char *) "O:guestfs_ping_daemon",
+ &py_g))
+ return NULL;
+ g = get_handle (py_g);
+
+ r = guestfs_ping_daemon (g);
+ if (r == -1) {
+ PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
+ return NULL;
+ }
+
+ Py_INCREF (Py_None);
+ py_r = Py_None;
+ return py_r;
+}
+
static PyMethodDef methods[] = {
{ (char *) "create", py_guestfs_create, METH_VARARGS, NULL },
{ (char *) "close", py_guestfs_close, METH_VARARGS, NULL },
@@ -3320,6 +3344,7 @@ static PyMethodDef methods[] = {
{ (char *) "mv", py_guestfs_mv, METH_VARARGS, NULL },
{ (char *) "drop_caches", py_guestfs_drop_caches, METH_VARARGS, NULL },
{ (char *) "dmesg", py_guestfs_dmesg, METH_VARARGS, NULL },
+ { (char *) "ping_daemon", py_guestfs_ping_daemon, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL }
};
diff --git a/python/guestfs.py b/python/guestfs.py
index e2989223..1596bcdb 100644
--- a/python/guestfs.py
+++ b/python/guestfs.py
@@ -1233,3 +1233,12 @@ class GuestFS:
"""
return libguestfsmod.dmesg (self._o)
+ def ping_daemon (self):
+ u"""This is a test probe into the guestfs daemon running
+ inside the qemu subprocess. Calling this function checks
+ that the daemon responds to the ping message, without
+ affecting the daemon or attached block device(s) in any
+ other way.
+ """
+ return libguestfsmod.ping_daemon (self._o)
+