From d059d480c3a5bbeb3bb2e8ff2350f85d64721c11 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Sat, 13 May 2017 16:15:37 +0100 Subject: netplan: pass macaddress, when specified, for vlans When vlan mac address is specified in config, render it for netplan and for ENI. LP: #1690388 --- cloudinit/net/netplan.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cloudinit/net/netplan.py') diff --git a/cloudinit/net/netplan.py b/cloudinit/net/netplan.py index 56b41be4..9b71de97 100644 --- a/cloudinit/net/netplan.py +++ b/cloudinit/net/netplan.py @@ -345,7 +345,9 @@ class Renderer(renderer.Renderer): 'id': ifcfg.get('vlan_id'), 'link': ifcfg.get('vlan-raw-device') } - + macaddr = ifcfg.get('mac_address', None) + if macaddr is not None: + vlan['macaddress'] = macaddr.lower() _extract_addresses(ifcfg, vlan) vlans.update({ifname: vlan}) -- cgit v1.2.3