diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2017-06-15 13:12:03 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-07-20 16:22:38 -0400 |
commit | 8317bcab7cd08f1dcd96095c0cb746b57cb27234 (patch) | |
tree | 2fa1ae081f95daf1c4ff281be6235d5dbf0e8a43 /cloudinit/net | |
parent | 31fa6f9d0f945868349c033fa049d2467ddcd478 (diff) | |
download | vyos-cloud-init-8317bcab7cd08f1dcd96095c0cb746b57cb27234.tar.gz vyos-cloud-init-8317bcab7cd08f1dcd96095c0cb746b57cb27234.zip |
sysconfig: handle manual type subnets
Implement manual control for sysconfig by using ONBOOT=N. This
allows an interface to be configured but not brought up.
Note that ONBOOT is per-interface not per address.
LP: #1687725
Diffstat (limited to 'cloudinit/net')
-rw-r--r-- | cloudinit/net/sysconfig.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py index abdd4dee..b0f2ccf5 100644 --- a/cloudinit/net/sysconfig.py +++ b/cloudinit/net/sysconfig.py @@ -298,6 +298,9 @@ class Renderer(renderer.Renderer): " for interface '%s'" % (subnet_type, iface_cfg.name)) + if subnet.get('control') == 'manual': + iface_cfg['ONBOOT'] = False + # set IPv4 and IPv6 static addresses ipv4_index = -1 ipv6_index = -1 |