diff options
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/net/eni.py | 9 | ||||
-rw-r--r-- | cloudinit/net/sysconfig.py | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py index 530922b5..a9a80c95 100644 --- a/cloudinit/net/eni.py +++ b/cloudinit/net/eni.py @@ -94,7 +94,7 @@ def _iface_add_attrs(iface, index, ipv4_subnet_mtu): ] renames = {'mac_address': 'hwaddress'} - if iface['type'] not in ['bond', 'bridge', 'vlan']: + if iface['type'] not in ['bond', 'bridge', 'infiniband', 'vlan']: ignore_map.append('mac_address') for key, value in iface.items(): @@ -472,9 +472,10 @@ class Renderer(renderer.Renderer): order = { 'loopback': 0, 'physical': 1, - 'bond': 2, - 'bridge': 3, - 'vlan': 4, + 'infiniband': 2, + 'bond': 3, + 'bridge': 4, + 'vlan': 5, } sections = [] diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py index 4e656768..e3815968 100644 --- a/cloudinit/net/sysconfig.py +++ b/cloudinit/net/sysconfig.py @@ -330,7 +330,8 @@ class Renderer(renderer.Renderer): old_value = iface.get(old_key) if old_value is not None: # only set HWADDR on physical interfaces - if old_key == 'mac_address' and iface['type'] != 'physical': + if (old_key == 'mac_address' and + iface['type'] not in ['physical', 'infiniband']): continue iface_cfg[new_key] = old_value |