]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/confile_utils.c
network: new network parser part II
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 20 Jun 2017 09:16:13 +0000 (11:16 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 20 Jun 2017 11:13:20 +0000 (13:13 +0200)
commitf9373e40b33f03d242d866486e3b3b85a1257524
tree0fb723c522bd39105a27c6d2f894838213862d2d
parent842404a7f3132d04a1f0ca05bba184cfd621dcd4
network: new network parser part II

Serge and I discussed the new network parser we've merge a couple of days ago.
He pointed out that a bunch of use-cases we're currently supporting in the old
network parser would be broken by the new parser. As we've pointed out many
times before, we're strongly commited to backwards compatibility and not
breaking existing use-cases. That's why we decided to take a new approach.
Instead of trying to mangle the old parser and new parser to come up with
something that allows a smooth transition we will simply deprecate the old
configuration keys with LXC 3.0. In the meantime we will support the full-blown
old legacy parser and the new network parser. Specifically, this means that
we're deprecating:

    lxc.network.*

in favor of

    lxc.net.*

With LXC 2.1. defining networks using lxc.network.* keys will cause a
deprecation warning to be shown/logged. We strongly suggest that users upgrade
their existing configuration files to switch to the new network configuration
parser. Starting with LXC 3.0 we will remove all lxc.network.* keys and will
only support lxc.net.* style network configurations.

Note that the new network configuration parser will only accept index based
configuration keys, i.e. we are only support lxc.net.[i].* keys without an
index such as lxc.net.type are not supported anymore. The advantages of this
approach are vast. Not just internally, but also user-facing since it is much
clearer what configuration key belongs to what network.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/Makefile.am
src/lxc/conf.c
src/lxc/confile.c
src/lxc/confile_network_legacy.c [new file with mode: 0644]
src/lxc/confile_network_legacy.h [new file with mode: 0644]
src/lxc/confile_utils.c
src/lxc/confile_utils.h
src/lxc/lxccontainer.c