def interfaces():
    with settings(hide('running', 'stdout')):
        if is_file('/usr/sbin/dladm'):
            res = run('/usr/sbin/dladm show-link')
        else:
            res = sudo('/sbin/ifconfig -s')
    return map(lambda line: line.split(' ')[0], res.splitlines()[1:])
Get the list of network interfaces. Will return all datalinks on SmartOS.
dataset/ETHPy150Open ronnix/fabtools/fabtools/network.py/interfaces