diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2017-05-13 16:15:37 +0100 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2017-05-19 17:10:01 -0400 |
commit | d059d480c3a5bbeb3bb2e8ff2350f85d64721c11 (patch) | |
tree | 8d4ad76d6d1397afdb53a6177271f37182b8e045 /cloudinit/net | |
parent | d91f03177c264e1c889a31f078a6915b7cb75291 (diff) | |
download | vyos-cloud-init-d059d480c3a5bbeb3bb2e8ff2350f85d64721c11.tar.gz vyos-cloud-init-d059d480c3a5bbeb3bb2e8ff2350f85d64721c11.zip |
netplan: pass macaddress, when specified, for vlans
When vlan mac address is specified in config, render it for
netplan and for ENI.
LP: #1690388
Diffstat (limited to 'cloudinit/net')
-rw-r--r-- | cloudinit/net/netplan.py | 4 |
1 files changed, 3 insertions, 1 deletions
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}) |