diff options
Diffstat (limited to 'cloudinit/net/__init__.py')
-rw-r--r-- | cloudinit/net/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py index 50e445ec..46bce184 100644 --- a/cloudinit/net/__init__.py +++ b/cloudinit/net/__init__.py @@ -167,6 +167,10 @@ def master_is_openvswitch(devname): return os.path.exists(ovs_path) +def is_ib_interface(devname): + return read_sys_net_safe(devname, "type") == "32" + + @functools.lru_cache(maxsize=None) def openvswitch_is_installed() -> bool: """Return a bool indicating if Open vSwitch is installed in the system.""" @@ -882,7 +886,7 @@ def _rename_interfaces( ) if len(errors): - raise Exception("\n".join(errors)) + raise RuntimeError("\n".join(errors)) def get_interface_mac(ifname): @@ -1040,7 +1044,7 @@ def get_interfaces_by_mac_on_linux(blacklist_drivers=None) -> dict: # cloud-init happens to enumerate network interfaces before drivers # have fully initialized the leader/subordinate relationships for # those devices or switches. - if driver == "mscc_felix" or driver == "fsl_enetc": + if driver in ("fsl_enetc", "mscc_felix", "qmi_wwan"): LOG.debug( "Ignoring duplicate macs from '%s' and '%s' due to " "driver '%s'.", |