[lxc-devel] [PATCH 2/3] python: Add binding for {get|set}_cgroup_item

2012-12-07 Thread Stéphane Graber
Updates the binding for the two new functions. This also fixes some problems with the argument checking of get_config_item that'd otherwise lead to a segfault. The python binding for set_cgroup_item and get_cgroup_item are pretty raw as lxc has little control over the cgroup entries. That means t

[lxc-devel] [PATCH 3/3] gitignore: Update for python files

2012-12-07 Thread Stéphane Graber
Signed-off-by: Stéphane Graber --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 79dd77a..a766716 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,9 @@ src/lxc/lxc-version src/lxc/lxc-wait src/lxc/legacy/lxc-ls +src/python-lxc/build/ +src

[lxc-devel] [PATCH 1/3] python: get_keys() doesn't require a path

2012-12-07 Thread Stéphane Graber
The python binding was forcing the user to pass a base path to get_keys() even though the C binding doesn't require it. Signed-off-by: Stéphane Graber --- src/python-lxc/lxc/__init__.py.in | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python-lxc/lxc/__init__.py.i

Re: [lxc-devel] API wishlist

2012-12-07 Thread Frederic Crozat
Le vendredi 07 décembre 2012 à 12:47 -0500, Stéphane Graber a écrit : > On 12/07/2012 12:25 PM, Serge Hallyn wrote: > > Quoting Stéphane Graber (stgra...@ubuntu.com): > > ... > >> - get_version() (not container specific) > >> - get_lxc_path() (not container specific) > >>Returns the storage p

Re: [lxc-devel] API wishlist

2012-12-07 Thread Stéphane Graber
On 12/07/2012 12:25 PM, Serge Hallyn wrote: > Quoting Stéphane Graber (stgra...@ubuntu.com): > ... >> - get_version() (not container specific) >> - get_lxc_path() (not container specific) >>Returns the storage path for the containers. >>Defaults to LXCPATH. >> - set_lxc_path(path) (not c

Re: [lxc-devel] [PATCH] python3-lxc: Fix build prefix/destdir

2012-12-07 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/python-lxc/Makefile.am | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am > index 15c61ea..9

Re: [lxc-devel] [PATCH 1/1] api: add set_cgroup_item and get_cgroup_item (to c api)

2012-12-07 Thread Stéphane Graber
On 12/06/2012 07:41 PM, Serge Hallyn wrote: > set_cgroup_item takes a pointer to a running container, a cgroup subsystem > name, and a char *value and it mimicks > 'lxc-cgroup -n containername subsys value' > get_cgroup_item takes a pointer to a running container, a a cgroup > subsystem name,

Re: [lxc-devel] API wishlist

2012-12-07 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): ... > - get_version() (not container specific) > - get_lxc_path() (not container specific) >Returns the storage path for the containers. >Defaults to LXCPATH. > - set_lxc_path(path) (not container specific) > > > Looking at my todolist for

[lxc-devel] [PATCH] python3-lxc: Fix build prefix/destdir

2012-12-07 Thread Stéphane Graber
Signed-off-by: Stéphane Graber --- src/python-lxc/Makefile.am | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am index 15c61ea..9d775c3 100644 --- a/src/python-lxc/Makefile.am +++ b/src/python-lxc/Makefile.am @@ -10,7 +

Re: [lxc-devel] [PATCH] lxc-create: Allow for empty or unset template name

2012-12-07 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > This restores an old behaviour where lxc-create can be called without > a template. In such case, only a minimal configuration is built and no > rootfs is created. However the various backingstore code is still used. > > Signed-off-by: Stéphane Grab

Re: [lxc-devel] [PATCH RFC] Enable use of user namespaces in containers

2012-12-07 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > > + if (idmaplist) > > + free(idmaplist); > > + > > + if (idmap) { > > + free(idmap); > > + } > > ^ code style isn't really consistent here :) :) fixed in my git branch ---

[lxc-devel] [PATCH] lxc-create: Allow for empty or unset template name

2012-12-07 Thread Stéphane Graber
This restores an old behaviour where lxc-create can be called without a template. In such case, only a minimal configuration is built and no rootfs is created. However the various backingstore code is still used. Signed-off-by: Stéphane Graber --- src/lxc/lxc-create.in | 22 +++--