From: Stéphane Graber Date: Wed, 27 Nov 2013 18:46:43 +0000 (-0500) Subject: python3: Add clear_config() to the binding X-Git-Tag: lxc-1.0.0.beta1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d15c21a4ed7a5dd8369f06ebad0827c7f21bb29;p=thirdparty%2Flxc.git python3: Add clear_config() to the binding Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c index 1ed8cbe92..7c28607c2 100644 --- a/src/python-lxc/lxc.c +++ b/src/python-lxc/lxc.c @@ -545,6 +545,14 @@ Container_attach_wait(Container *self, PyObject *args, PyObject *kwds) return Container_attach_and_possibly_wait(self, args, kwds, 1); } +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) { @@ -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"