[lxc-devel] [PATCH] python3: Export some missing constants

Serge Hallyn serge.hallyn at ubuntu.com
Thu Nov 28 03:11:08 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/__init__.py | 37 +++++++++++++++++++++++++------------
>  1 file changed, 25 insertions(+), 12 deletions(-)
> 
> diff --git a/src/python-lxc/lxc/__init__.py b/src/python-lxc/lxc/__init__.py
> index 52f0fb4..eddd198 100644
> --- a/src/python-lxc/lxc/__init__.py
> +++ b/src/python-lxc/lxc/__init__.py
> @@ -474,19 +474,32 @@ def arch_to_personality(arch):
>          arch = str(arch, 'utf-8')
>      return _lxc.arch_to_personality(arch)
>  
> -# Some constants for attach
> -LXC_ATTACH_KEEP_ENV = _lxc.LXC_ATTACH_KEEP_ENV
> +# namespace flags (no other python lib exports this)
> +CLONE_NEWIPC = _lxc.CLONE_NEWIPC
> +CLONE_NEWNET = _lxc.CLONE_NEWNET
> +CLONE_NEWNS = _lxc.CLONE_NEWNS
> +CLONE_NEWPID = _lxc.CLONE_NEWPID
> +CLONE_NEWUSER = _lxc.CLONE_NEWUSER
> +CLONE_NEWUTS = _lxc.CLONE_NEWUTS
> +
> +# attach: environment variable handling
>  LXC_ATTACH_CLEAR_ENV = _lxc.LXC_ATTACH_CLEAR_ENV
> -LXC_ATTACH_MOVE_TO_CGROUP = _lxc.LXC_ATTACH_MOVE_TO_CGROUP
> +LXC_ATTACH_KEEP_ENV = _lxc.LXC_ATTACH_KEEP_ENV
> +
> +# attach: attach options
> +LXC_ATTACH_DEFAULT = _lxc.LXC_ATTACH_DEFAULT
>  LXC_ATTACH_DROP_CAPABILITIES = _lxc.LXC_ATTACH_DROP_CAPABILITIES
> -LXC_ATTACH_SET_PERSONALITY = _lxc.LXC_ATTACH_SET_PERSONALITY
> -LXC_ATTACH_LSM_NOW = _lxc.LXC_ATTACH_LSM_NOW
>  LXC_ATTACH_LSM_EXEC = _lxc.LXC_ATTACH_LSM_EXEC
> +LXC_ATTACH_LSM_NOW = _lxc.LXC_ATTACH_LSM_NOW
> +LXC_ATTACH_MOVE_TO_CGROUP = _lxc.LXC_ATTACH_MOVE_TO_CGROUP
>  LXC_ATTACH_REMOUNT_PROC_SYS = _lxc.LXC_ATTACH_REMOUNT_PROC_SYS
> -LXC_ATTACH_DEFAULT = _lxc.LXC_ATTACH_DEFAULT
> -CLONE_NEWUTS = _lxc.CLONE_NEWUTS
> -CLONE_NEWIPC = _lxc.CLONE_NEWIPC
> -CLONE_NEWUSER = _lxc.CLONE_NEWUSER
> -CLONE_NEWPID = _lxc.CLONE_NEWPID
> -CLONE_NEWNET = _lxc.CLONE_NEWNET
> -CLONE_NEWNS = _lxc.CLONE_NEWNS
> +LXC_ATTACH_SET_PERSONALITY = _lxc.LXC_ATTACH_SET_PERSONALITY
> +
> +# clone: clone flags
> +LXC_CLONE_COPYHOOKS = _lxc.LXC_CLONE_COPYHOOKS
> +LXC_CLONE_KEEPMACADDR = _lxc.LXC_CLONE_KEEPMACADDR
> +LXC_CLONE_KEEPNAME = _lxc.LXC_CLONE_KEEPNAME
> +LXC_CLONE_SNAPSHOT = _lxc.LXC_CLONE_SNAPSHOT
> +
> +# create: create flags
> +LXC_CREATE_QUIET = _lxc.LXC_CREATE_QUIET
> -- 
> 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