summaryrefslogtreecommitdiff
path: root/cloudinit/net/renderer.py
diff options
context:
space:
mode:
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')