← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~prometheanfire/cloud-init:fix-netdev-listing into cloud-init:master


Matthew Thode has proposed merging ~prometheanfire/cloud-init:fix-netdev-listing into cloud-init:master.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
Your team cloud init development team is requested to review the proposed merge of ~prometheanfire/cloud-init:fix-netdev-listing into cloud-init:master.
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index 21cc602..eb15c48 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -96,7 +96,11 @@ def is_present(devname):
 def get_devicelist():
-    return os.listdir(SYS_CLASS_NET)
+    ignored_interfaces = ('sit', 'tunl', 'bonding_master', 'teql',
+                          'ip6_vti', 'ip6tnl', 'bond', 'lo')
+    interfaces = [f for f in os.listdir(SYS_CLASS_NET)
+                  if not f.startswith(ignored_interfaces)]
+    return interfaces
 class ParserError(Exception):

Follow ups