List wlan_groups
----------------
returns an array containing known wlan_groups
549655
public function list_wlan_groups()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/list/wlangroup');

        return $this->process_response($response);
    }
283059
def get_groupnames(self, hostgroups):
        
        group_names = []
        for hostgroup_id in self.hostgroups:
            hostgroup = hostgroups[hostgroup_id]
            group_names.append(hostgroup.get_name())
        return ','.join(sorted(group_names))
1151468
def groups(self):
        
        if not self._groups:
            self._groups = ComponentGroups(self.api_client)
        return self._groups
64942
def get_groups(network_id, template_id=None, **kwargs):
    
    user_id = kwargs.get('user_id')
    try:
        net_i = db.DBSession.query(Network).filter(Network.id == network_id).one()
        net_i.check_read_permission(user_id=user_id)
    except NoResultFound:
        raise ResourceNotFoundError("Network %s not found"%(network_id))

    group_qry = db.DBSession.query(ResourceGroup).filter(
                                        ResourceGroup.network_id==network_id,
                                        ResourceGroup.status=='A').options(
                                            noload('network')
                                        ).options(
                                            joinedload_all('types.templatetype')
                                        ).options(
                                            joinedload_all('attributes.attr')
                                        )
    if template_id is not None:
        group_qry = group_qry.filter(ResourceType.group_id==ResourceGroup.id,
                                     TemplateType.id==ResourceType.type_id,
                                     TemplateType.template_id==template_id)

    groups = group_qry.all()

    return groups
1226209
def getNeighbouringDevices(self):
        
        print '%s call getNeighbouringDevices' % self.port
        neighbourList = []

        # get parent info
        parentAddr = self.getParentAddress()
        if parentAddr != 0:
            neighbourList.append(parentAddr)

        # get ED/SED children info
        childNeighbours = self.getChildrenInfo()
        if childNeighbours != None and len(childNeighbours) > 0:
            for entry in childNeighbours:
                neighbourList.append(entry)

        # get neighboring routers info
        routerNeighbours = self.getNeighbouringRouters()
        if routerNeighbours != None and len(routerNeighbours) > 0:
            for entry in routerNeighbours:
                neighbourList.append(entry)

        print neighbourList
        return neighbourList
1180790
def _get_side1KerningGroups(self):
        
        found = {}
        for name, contents in self.items():
            if name.startswith("public.kern1."):
                found[name] = contents
        return found
679900
def groups(self, group_type=None, filters=None, params=None):
        
        group = self._tcex.ti.group(group_type)
        for g in self.tc_requests.groups_from_tag(group, self.name, filters=filters, params=params):
            yield g
284757
function listNetInterfaces() {
    return new Promise((ac, rj) => {
        exec('nmcli d', (err, stdout, stderr) => {
            const lines = stdout.split('\n');
            if (err || lines.length<2) {
                rj({error: 'No network available.'});
                return;
            }

            lines.shift();
            // Correct visible APs should be listed
            let bWlanExist = false;
            const interfaces = [];
            lines.forEach((line)=>{
                let sp = line.trim().split(/\s+/);
                if (sp.length < 4 || sp[0]=='lo') return; // Illegally formatted line
                if (sp[0].indexOf('wlan')==0) bWlanExist = true;
                interfaces.push(sp[0]);
            });

            ac([interfaces, bWlanExist]);
        });
    });
}
1331600
def get_wifi_list(self, startno, callback=None):
        '''
        
        '''
        params = {'startNo': startno}
        return self.execute_command('getWifiList', params, callback=callback)
195940
def group_list():
    '''
    
    '''

    ret = {'installed': [],
        'partially_installed': [],
        'available': []}

    # find out what's available

    cmd = ['pacman', '-Sgg']
    out = __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False)

    available = {}

    for line in salt.utils.itertools.split(out, '\n'):
        if not line:
            continue
        try:
            group, pkg = line.split()[0:2]
        except ValueError:
            log.error('Problem parsing pacman -Sgg: Unexpected formatting in '
                      'line: \'%s\'', line)
        else:
            available.setdefault(group, []).append(pkg)

    # now get what's installed

    cmd = ['pacman', '-Qg']
    out = __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False)
    installed = {}
    for line in salt.utils.itertools.split(out, '\n'):
        if not line:
            continue
        try:
            group, pkg = line.split()[0:2]
        except ValueError:
            log.error('Problem parsing pacman -Qg: Unexpected formatting in '
                      'line: \'%s\'', line)
        else:
            installed.setdefault(group, []).append(pkg)

    # move installed and partially-installed items from available to appropriate other places

    for group in installed:
        if group not in available:
            log.error(
                'Pacman reports group %s installed, but it is not in the '
                'available list (%s)!', group, available
            )
            continue
        if len(installed[group]) == len(available[group]):
            ret['installed'].append(group)
        else:
            ret['partially_installed'].append(group)
        available.pop(group)

    ret['installed'].sort()
    ret['partially_installed'].sort()

    # Now installed and partially installed are set, whatever is left is the available list.
    # In Python 3, .keys() returns an iterable view instead of a list. sort() cannot be
    # called on views. Use sorted() instead. Plus it's just as efficient as sort().
    ret['available'] = sorted(available.keys())

    return ret
429006
def _get_groups(network_id, template_id=None):
    
    extras = {'types':[], 'attributes':[]}
    group_qry = db.DBSession.query(ResourceGroup).filter(
                                        ResourceGroup.network_id==network_id,
                                        ResourceGroup.status=='A').options(
                                            noload('network')
                                        )

    if template_id is not None:
        group_qry = group_qry.filter(ResourceType.group_id==ResourceGroup.id,
                                     TemplateType.id==ResourceType.type_id,
                                     TemplateType.template_id==template_id)

    group_res = db.DBSession.execute(group_qry.statement).fetchall()
    groups = []
    for g in group_res:
        groups.append(JSONObject(g, extras=extras))

    return groups
428936
def scan_results(self, obj):
        """"""

        avail_network_list = pointer(WLAN_AVAILABLE_NETWORK_LIST())
        self._wlan_get_available_network_list(self._handle,
            byref(obj['guid']), byref(avail_network_list))
        networks = cast(avail_network_list.contents.Network,
                     POINTER(WLAN_AVAILABLE_NETWORK))

        self._logger.debug("Scan found %d networks.",
            avail_network_list.contents.dwNumberOfItems)

        network_list = []
        for i in range(avail_network_list.contents.dwNumberOfItems):

            if networks[i].dot11BssType == 1 and networks[i].bNetworkConnectable :

                ssid = ''
                for j in range(networks[i].dot11Ssid.uSSIDLength):

                    if networks[i].dot11Ssid.ucSSID != b'':
                        ssid += "%c" % networks[i].dot11Ssid.ucSSID[j]

                bss_list = pointer(WLAN_BSS_LIST())
                self._wlan_get_network_bss_list(self._handle,
                    byref(obj['guid']), byref(bss_list), networks[i].dot11Ssid, networks[i].bSecurityEnabled)
                bsses = cast(bss_list.contents.wlanBssEntries,
                             POINTER(WLAN_BSS_ENTRY))

                if networks[i].bSecurityEnabled:
                    akm = self._get_akm(networks[i].dot11DefaultCipherAlgorithm)
                    auth_alg = self._get_auth_alg(networks[i].dot11DefaultAuthAlgorithm)
                else:
                    akm = [AKM_TYPE_NONE]
                    auth_alg = [AUTH_ALG_OPEN]

                for j in range(bss_list.contents.dwNumberOfItems):
                    network = Profile()

                    network.ssid = ssid

                    network.bssid = ''
                    for k in range(6):
                        network.bssid += "%02x:" % bsses[j].dot11Bssid[k]

                    network.signal = bsses[j].lRssi
                    network.freq = bsses[j].ulChCenterFrequency
                    network.auth = auth_alg
                    network.akm = akm
                    network_list.append(network)

        return network_list
744014
def network_profiles(self, obj):
        """"""

        profile_name_list = self.network_profile_name_list(obj)

        profile_list = []
        for profile_name in profile_name_list:
            profile = Profile()
            flags = DWORD()
            access = DWORD()
            xml = LPWSTR()
            self._wlan_get_profile(self._handle, obj['guid'],
                                   profile_name, byref(xml), byref(flags),
                                   byref(access))
            # fill profile info
            profile.ssid = re.search(r'<name>(.*)</name>', xml.value).group(1)
            auth = re.search(r'<authentication>(.*)</authentication>',
                                 xml.value).group(1).upper()

            profile.akm = []
            if auth not in akm_str_to_value_dict:
                if auth not in auth_str_to_value_dict:
                    profile.auth = AUTH_ALG_OPEN
                else:
                    profile.auth = auth_str_to_value_dict[auth]
                    profile.akm.append(AKM_TYPE_NONE)
            else:
                    profile.auth = AUTH_ALG_OPEN
                    profile.akm.append(akm_str_to_value_dict[auth])

            profile_list.append(profile)

        return profile_list
956160
async def ListSubnets(self, space_tag, zone):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='DiscoverSpaces',
                   request='ListSubnets',
                   version=2,
                   params=_params)
        _params['space-tag'] = space_tag
        _params['zone'] = zone
        reply = await self.rpc(msg)
        return reply
1071240
def groups(self):
        
        group_list = []
        all_groups = self.get('memberof')
        for group_dn in all_groups:
            if self.__ldap_group_ou__ in group_dn:
                group_list.append(group_dn)

        return group_list
375067
def groups(self) -> Set[str]:
        
        return set(opt.group_name for opt in self._options.values())
1082723
def deployment_groups(self):
        
        if not self.__deployment_groups:
            self.__deployment_groups = DeploymentGroups(self.__connection)
        return self.__deployment_groups