[lxc-devel] [PATCH 6/7] python3: Add controllable property to the binding
Serge Hallyn
serge.hallyn at ubuntu.com
Wed Nov 27 22:36:43 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 7c28607..43e571d 100644
> --- a/src/python-lxc/lxc.c
> +++ b/src/python-lxc/lxc.c
> @@ -456,6 +456,16 @@ Container_config_file_name(Container *self, void *closure)
> }
>
> static PyObject *
> +Container_controllable(Container *self, void *closure)
> +{
> + if (self->container->may_control(self->container)) {
> + Py_RETURN_TRUE;
> + }
> +
> + Py_RETURN_FALSE;
> +}
> +
> +static PyObject *
> Container_defined(Container *self, void *closure)
> {
> if (self->container->is_defined(self->container)) {
> @@ -1101,6 +1111,10 @@ static PyGetSetDef Container_getseters[] = {
> (getter)Container_config_file_name, NULL,
> "Path to the container configuration",
> NULL},
> + {"controllable",
> + (getter)Container_controllable, NULL,
> + "Boolean indicating whether the container may be controlled",
> + NULL},
> {"defined",
> (getter)Container_defined, NULL,
> "Boolean indicating whether the container configuration exists",
> --
> 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