def list_interfaces(style=None):
    '''
    List all of the wireless interfaces

    CLI Example:

        salt minion iwtools.list_interfaces
    '''
    ret = {}
    tmp = None
    iface = None
    out = __salt__['cmd.run']('iwconfig')
    for line in out.splitlines():
        if not line:
            continue
        if 'no wireless extensions' in line:
            continue
        comps = line.strip().split('  ')
        if not line.startswith(' '):
            if tmp is not None:
                ret[iface] = tmp.copy()
            iface = comps.pop(0)
            tmp = {'extra': []}
        for item in comps:
            if ':' in item:
                parts = item.split(':')
                key = parts[0].strip()
                value = parts[1].strip()
                if key == 'ESSID':
                    value = value.lstrip('"').rstrip('"')
                tmp[key] = value
            elif '=' in item:
                parts = item.split('=')
                tmp[parts[0].strip()] = parts[1].strip()
            else:
                tmp['extra'].append(item)

    ret[iface] = tmp.copy()

    if style == 'list':
        return ret.keys()

    return ret
dataset/ETHPy150Open saltstack/salt/salt/modules/iwtools.py/list_interfaces/original