[lxc-devel] [PATCH 5/7] python3: Add clear_config() to the binding

Serge Hallyn serge.hallyn at ubuntu.com
Wed Nov 27 22:36:00 UTC 2013


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn 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
> 
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list