summaryrefslogtreecommitdiff
path: root/cloudinit/net/renderer.py
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2017-06-14 12:58:40 -0500
committerScott Moser <smoser@brickies.net>2017-07-20 14:29:35 -0400
commit51febf7363692d7947fe17a4fbfcb85058168ccb (patch)
tree06621b015f65ee8de466e0e1147c175dd99e343c /cloudinit/net/renderer.py
parentdcbe479575fac9f293c5c4089f4bcb46ab887206 (diff)
downloadvyos-cloud-init-51febf7363692d7947fe17a4fbfcb85058168ccb.tar.gz
vyos-cloud-init-51febf7363692d7947fe17a4fbfcb85058168ccb.zip
sysconfig: fix rendering of bond, bridge and vlan types.
Previously, virtual types (bond, bridge, vlan) were almost completely broken. They would not get any network configuration (ip addresses or dhcp config) and or routes rendered. This fixes those issues. For bonds we now correctly render BONDING_SLAVE entries. Also add tests for simple bond, bridge and vlan. LP: #1695092
Diffstat (limited to 'cloudinit/net/renderer.py')
-rw-r--r--cloudinit/net/renderer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/net/renderer.py b/cloudinit/net/renderer.py
index bba139e5..57652e27 100644
--- a/cloudinit/net/renderer.py
+++ b/cloudinit/net/renderer.py
@@ -20,6 +20,10 @@ def filter_by_name(match_name):
return lambda iface: match_name == iface['name']
+def filter_by_attr(match_name):
+ return lambda iface: (match_name in iface and iface[match_name])
+
+
filter_by_physical = filter_by_type('physical')