[lxc-devel] [PATCH 5/7] python3: Add clear_config() to the binding
Stéphane Graber
stgraber at ubuntu.com
Wed Nov 27 22:04:54 UTC 2013
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
src/python-lxc/lxc.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c
index 1ed8cbe..7c28607 100644
--- a/src/python-lxc/lxc.c
+++ b/src/python-lxc/lxc.c
@@ -546,6 +546,14 @@ Container_attach_wait(Container *self, PyObject *args, PyObject *kwds)
}
static PyObject *
+Container_clear_config(Container *self, PyObject *args, PyObject *kwds)
+{
+ self->container->clear_config(self->container);
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *
Container_clear_config_item(Container *self, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"key", NULL};
@@ -1129,6 +1137,12 @@ static PyMethodDef Container_methods[] = {
"\n"
"Attach to the container. Returns the exit code of the process."
},
+ {"clear_config", (PyCFunction)Container_clear_config,
+ METH_NOARGS,
+ "clear_config()\n"
+ "\n"
+ "Clear any container configuration."
+ },
{"clear_config_item", (PyCFunction)Container_clear_config_item,
METH_VARARGS|METH_KEYWORDS,
"clear_config_item(key) -> boolean\n"
--
1.8.4.4
More information about the lxc-devel
mailing list