def ipoib_interfaces():
    """Return a list of IPOIB capable ethernet interfaces"""
    interfaces = []

    for interface in network_interfaces():
        try:
            driver = re.search('^driver: (.+)$', subprocess.check_output([
                'ethtool', '-i',
                interface]), re.M).group(1)

            if driver in IPOIB_DRIVERS:
                interfaces.append(interface)
        except Exception:
            log("Skipping interface %s" % interface, level=INFO)
            continue

    return interfaces
Return a list of IPOIB capable ethernet interfaces