Commit Graph

11 Commits

Author SHA1 Message Date
Stéphane Graber
cd063f4524 python3: Update apitest
This update will make it work unprivileged as well as testing a few of
the new functions.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-02-13 14:14:11 -05:00
Stéphane Graber
c756a6e91b python3: Drop API warning and fix pep8/pyflakes3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-02-13 14:14:03 -05:00
Stéphane Graber
0464b881e6 shutdown: Rework API and lxc-stop
With this change, shutdown() will no longer call stop() after the
timeout, instead it'll just return false and it's up to the caller to
then call stop() if appropriate.

This also updates the bindings, tests and other scripts.

lxc-stop is then updated to do proper option checking and use shutdown,
stop or reboot as appropriate.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-31 18:08:33 +00:00
Stéphane Graber
e6c6d62287
tests: Fix python3 API test
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-24 14:00:02 -05:00
Stéphane Graber
2edd7a881d python3: Fix PEP8 and avoid crash when listing
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-03 16:47:52 -05:00
Stéphane Graber
f10e04e361 Make 'make dist' match git content
This fixes a few obvious issues when comparing the make dist output with
the git tree.

 - Make all templates non-executable in git
 - Remove unused files:
   - src/lxc/list.c (empty, only includes the list.h header)
   - src/lxc/lxc-destroy.in (replace by lxc_destroy.c)
 - Add missing files to dist tarball:
   - src/python-lxc/examples/pyconsole.py
   - src/python-lxc/examples/pyconsole-vte.py
 - Mark all the python API tests executable
 - Mark lxc-test-ubuntu executable

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-10-16 11:41:24 -05:00
S.Çağlar Onur
799f29ab69 Add get_interfaces to the API
get_ips accepts an interface name as a parameter but there was no
way to get the interfaces names from the container. This patch
introduces a new get_interfaces call to the API so that users
can obtain the name of the interfaces.

Support for python bindings also introduced as a part of this version.

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-18 14:35:49 -05:00
Stéphane Graber
250b1eec71
licensing: Add missing headers and FSF address
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-03 14:33:03 -04:00
Stéphane Graber
ca9548ad02 python: Fix api_test to use the new attach() API
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-09-03 09:35:39 -04:00
Stéphane Graber
9c83a66139
lxcapi: Add new get_ips() call
This adds a new get_ips call which takes a family (inet, inet6 or NULL),
a network interface (or NULL for all) and a scope (0 for global) and returns
a char** of all the IPs in the container.

This also adds a matching python3 binding (function result is a tuple) and
deprecates the previous pure-python get_ips() implementation.

WARNING: The python get_ips() call is quite different from the previous
implementation. The timeout argument has been removed, the family names are
slightly different (inet/inet6 vs ipv4/ipv6) and an extra scope parameter
has been added.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-05-21 11:08:31 -04:00
Stéphane Graber
1cb4260d10 python api_test: Drop use of @LXCPATH@
The python api test script was using @LXCPATH@ for one of its checks.
Now that the lxcpath is exposed by the lxc python module directly, this
can be dropped and api_test.py can now become a simple python file without
needing pre-processing by autoconf.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-03-01 13:56:04 -05:00