Commit 5d15c21a by Stéphane Graber

python3: Add clear_config() to the binding

parent b6c70e43
...@@ -546,6 +546,14 @@ Container_attach_wait(Container *self, PyObject *args, PyObject *kwds) ...@@ -546,6 +546,14 @@ Container_attach_wait(Container *self, PyObject *args, PyObject *kwds)
} }
static PyObject * 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) Container_clear_config_item(Container *self, PyObject *args, PyObject *kwds)
{ {
static char *kwlist[] = {"key", NULL}; static char *kwlist[] = {"key", NULL};
...@@ -1129,6 +1137,12 @@ static PyMethodDef Container_methods[] = { ...@@ -1129,6 +1137,12 @@ static PyMethodDef Container_methods[] = {
"\n" "\n"
"Attach to the container. Returns the exit code of the process." "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, {"clear_config_item", (PyCFunction)Container_clear_config_item,
METH_VARARGS|METH_KEYWORDS, METH_VARARGS|METH_KEYWORDS,
"clear_config_item(key) -> boolean\n" "clear_config_item(key) -> boolean\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment