From 8317bcab7cd08f1dcd96095c0cb746b57cb27234 Mon Sep 17 00:00:00 2001 From: Ryan Harper Date: Thu, 15 Jun 2017 13:12:03 -0500 Subject: 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 --- cloudinit/net/sysconfig.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cloudinit/net') 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 -- cgit v1.2.3