[lxc-devel] [PATCH 0/9 V1] Rewrite lxc-device.

Dongsheng Yang yangds.fnst at cn.fujitsu.com
Wed Sep 17 00:57:10 UTC 2014


Hi all:
	This patchset here is to rewrite lxc-device to drop
the dependence to ip command.
	[7/9] is to add two interfaces named [at|de]tach_interface.
Thanx for the suggestion from Stgraber, I can move the interface from
container back to host now.
	[8/9] added the two new interface of [at|de]tach_interface
to class Container in python-binding.
	[9/9] rewrite the lxc-device using the new functions, droping
the dependence to external command of ip.

Others are about some preparation or enhancement I think.

Any comments, thoughts, proposals are really welcome.

Thanx

Changelog:
	- [7/9] Move netdev from container back to host when we are
detaching it. Rather than delete it directly.

Dongsheng Yang (9):
  network: convert param ifname to const.
  network: check result of if_nametoindex().
  lxc_start: ERROR if container is already running.
  network: allow lxc_network_move_by_index() rename netdev in moving.
  network: introduce a interface named lxc_netdev_isup().
  utils: move useful helper functions from lxccontainer to utils.
  container: introduce two functions named as {at/de}tach_interface().
  python-lxc: Add [at|de]tach_interface() to python binding.
  lxc-device: rewrite lxc-device.

 src/lxc/Makefile.am    |   4 +-
 src/lxc/conf.c         |   4 +-
 src/lxc/lxc-device     |  97 -----------------------------
 src/lxc/lxc_device.c   | 166 +++++++++++++++++++++++++++++++++++++++++++++++++
 src/lxc/lxc_start.c    |   4 ++
 src/lxc/lxc_unshare.c  |   2 +-
 src/lxc/lxc_user_nic.c |   2 +-
 src/lxc/lxccontainer.c | 131 ++++++++++++++++++++++++--------------
 src/lxc/lxccontainer.h |  19 ++++++
 src/lxc/network.c      |  80 +++++++++++++++++++++++-
 src/lxc/network.h      |   6 +-
 src/lxc/utils.c        |  55 ++++++++++++++++
 src/lxc/utils.h        |   2 +
 src/python-lxc/lxc.c   |  73 ++++++++++++++++++++++
 14 files changed, 490 insertions(+), 155 deletions(-)
 delete mode 100644 src/lxc/lxc-device
 create mode 100644 src/lxc/lxc_device.c

-- 
1.8.4.2



More information about the lxc-devel mailing list