summaryrefslogtreecommitdiff
path: root/cloudinit/net/sysconfig.py
diff options
context:
space:
mode:
authorDarren Birkett <darren.birkett@gmail.com>2019-10-21 16:17:03 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-21 16:17:03 +0000
commit02c8214eac857e29b40ecc65992c1da6983083e1 (patch)
treefd4098986e46b8089a21ce08f400b2ca7465ce7e /cloudinit/net/sysconfig.py
parentecb501b84338f078be18c38c68c3ce87fed3584b (diff)
downloadvyos-cloud-init-02c8214eac857e29b40ecc65992c1da6983083e1.tar.gz
vyos-cloud-init-02c8214eac857e29b40ecc65992c1da6983083e1.zip
net: enable infiniband support in eni and sysconfig renderers
Commit e7b0e5f72 added support for configuring infiniband devices by adding a new infiniband 'type'. This commit updates eni and sysconfig renderers to consume this new type and configure infiniband devices correctly. LP: #1847114
Diffstat (limited to 'cloudinit/net/sysconfig.py')
-rw-r--r--cloudinit/net/sysconfig.py3
1 files changed, 2 insertions, 1 deletions
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