summaryrefslogtreecommitdiff
path: root/cloudinit/net
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-08-03 14:55:18 -0400
committerScott Moser <smoser@brickies.net>2016-08-23 13:17:59 -0400
commit6a8aa46863f1a4a5f3c0d37d34fd02d57790be01 (patch)
tree5de3029a37609fbd9ddc997e3a578e2c8a09cb0f /cloudinit/net
parent40a2f621b05c11ed6397a1735b6bfff0ea07b097 (diff)
downloadvyos-cloud-init-6a8aa46863f1a4a5f3c0d37d34fd02d57790be01.tar.gz
vyos-cloud-init-6a8aa46863f1a4a5f3c0d37d34fd02d57790be01.zip
Generate a dummy bond name for OpenStack
The OpenStack network_data.json does not provide a name for bond links. This change makes it so a dummy one is generated and used instead to satisfy cloud-init which does require one. In order to write the correct link (underlying 'link' names) for the bonds, we maintain a list of info by ids so we can easily get the right device name. Also: * add a vlan test case that similarly references an id rather than name. * make bond interfaces auto LP: #1605749
Diffstat (limited to 'cloudinit/net')
-rw-r--r--cloudinit/net/eni.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py
index eff5b924..cd533ddb 100644
--- a/cloudinit/net/eni.py
+++ b/cloudinit/net/eni.py
@@ -399,7 +399,7 @@ class Renderer(renderer.Renderer):
else:
# ifenslave docs say to auto the slave devices
lines = []
- if 'bond-master' in iface:
+ if 'bond-master' in iface or 'bond-slaves' in iface:
lines.append("auto {name}".format(**iface))
lines.append("iface {name} {inet} {mode}".format(**iface))
lines.extend(_iface_add_attrs(iface, index=0))