diff options
Diffstat (limited to 'cloudinit/net/eni.py')
-rw-r--r-- | cloudinit/net/eni.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py index bb48a6eb..2da13ffd 100644 --- a/cloudinit/net/eni.py +++ b/cloudinit/net/eni.py @@ -369,11 +369,20 @@ class Renderer(renderer.Renderer): if iface['mode'].startswith('dhcp'): iface['mode'] = 'dhcp' - sections.append( + lines = list( _iface_start_entry(iface, index) + _iface_add_subnet(iface, subnet) + _iface_add_attrs(iface) ) + for route in subnet.get('routes', []): + lines.extend(self._render_route(route, indent=" ")) + + if len(subnets) > 1 and index == 0: + tmpl = " post-up ifup %s:%s\n" + for i in range(1, len(subnets)): + lines.append(tmpl % (iface['name'], i)) + + sections.append(lines) else: # ifenslave docs say to auto the slave devices lines = [] |