summaryrefslogtreecommitdiff
path: root/cloudinit/sources/helpers/openstack.py
diff options
context:
space:
mode:
authorFabian Wiesel <fabian.wiesel@sap.com>2018-09-14 19:33:01 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-09-14 19:33:01 +0000
commitc6cfed7fb58be76a3f95963a5de469aa03542cd3 (patch)
treeb609c9d2f9b79051b490f28b8a24213713b9d962 /cloudinit/sources/helpers/openstack.py
parent84bf2482ad569357541e94d8f7f90cf0cdd759e2 (diff)
downloadvyos-cloud-init-c6cfed7fb58be76a3f95963a5de469aa03542cd3.tar.gz
vyos-cloud-init-c6cfed7fb58be76a3f95963a5de469aa03542cd3.zip
OpenStack: Support setting mac address on bond.
Fix a bug where setting of mac address on a bond device was ignored when provided in OpenStack network_config.json. LP: #1682064
Diffstat (limited to 'cloudinit/sources/helpers/openstack.py')
-rw-r--r--cloudinit/sources/helpers/openstack.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index d6f39a1e..76a6e310 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -604,6 +604,8 @@ def convert_net_json(network_json=None, known_macs=None):
cfg.update({'type': 'physical', 'mac_address': link_mac_addr})
elif link['type'] in ['bond']:
params = {}
+ if link_mac_addr:
+ params['mac_address'] = link_mac_addr
for k, v in link.items():
if k == 'bond_links':
continue