Request all networks information.
13754
def request_networks(blink):
    """"""
    url = "{}/networks".format(blink.urls.base_url)
    return http_get(blink, url)
445588
def gather_details():
    """"""
    try:
        data = {
            'kernel': platform.uname(),
            'distribution': platform.linux_distribution(),
            'libc': platform.libc_ver(),
            'arch': platform.machine(),
            'python_version': platform.python_version(),
            'os_name': platform.system(),
            'static_hostname': platform.node(),
            'cpu': platform.processor(),
            'fqdn': socket.getfqdn(),
        }
    except AttributeError:
        return {}

    return data
272206
def get_networks(network_id=None):
    """"""
    session = db.get_reader_session()
    with session.begin():
        model = models_v2.Network
        networks = session.query(model).filter(model.project_id != '')
        if network_id:
            networks = networks.filter(model.id == network_id)
    return networks.all()
170212
async def NetworkInfo(self, bindings, unit):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Uniter',
                   request='NetworkInfo',
                   version=5,
                   params=_params)
        _params['bindings'] = bindings
        _params['unit'] = unit
        reply = await self.rpc(msg)
        return reply
898962
def request_network_status(blink, network):
    
    url = "{}/network/{}".format(blink.urls.base_url, network)
    return http_get(blink, url)
820691
def wifi_status(self):
        """"""
        return self._info_json.get(CONST.STATUS, {}).get(CONST.WIFI_LINK)
893259
def get_network_versions(self, name: str) -> Set[str]:
        """"""
        return {
            version
            for version, in self.session.query(Network.version).filter(Network.name == name).all()
        }
1233217
def retrieveVals(self):
        """"""
        for iface in self._ifaceList:
            stats = self._ifaceStats.get(iface)
            graph_name = 'netiface_traffic_%s' % iface
            if self.hasGraph(graph_name):
                self.setGraphVal(graph_name, 'rx', stats.get('rxbytes') * 8)
                self.setGraphVal(graph_name, 'tx', stats.get('txbytes') * 8)
            graph_name = 'netiface_errors_%s' % iface
            if self.hasGraph(graph_name):
                for field in ('rxerrs', 'txerrs', 'rxframe', 'txcarrier',
                    'rxdrop', 'txdrop', 'rxfifo', 'txfifo'):
                    self.setGraphVal(graph_name, field, stats.get(field))
509383
def prepare_network(self):
        """"""
        hydpy.pub.selections = selectiontools.Selections()
        hydpy.pub.selections += hydpy.pub.networkmanager.load_files()
        self.update_devices(hydpy.pub.selections.complete)
1317927
def get_conn_info(self):
        """"""
        return session.ConnectionInfo(self.request.remote_ip,
                                      self.request.cookies,
                                      self.request.arguments,
                                      self.request.headers,
                                      self.request.path)
896424
def network_list(provider):
    '''
    

    '''
    client = _get_client()
    return client.extra_action(action='network_list', provider=provider, names='names')
303098
async def _load_all_nodes(self):
        """"""
        get_all_nodes_information = GetAllNodesInformation(pyvlx=self.pyvlx)
        await get_all_nodes_information.do_api_call()
        if not get_all_nodes_information.success:
            raise PyVLXException("Unable to retrieve node information")
        self.clear()
        for notification_frame in get_all_nodes_information.notification_frames:
            node = convert_frame_to_node(self.pyvlx, notification_frame)
            if node is not None:
                self.add(node)
64455
def net_query(name: str) -> Constants:
    '''
    '''

    for net_params in networks:
        if name in (net_params.name, net_params.shortname,):
            return net_params

    raise UnsupportedNetwork
1326578
def network_profiles(self):
        """"""

        profiles = self._wifi_ctrl.network_profiles(self._raw_obj)

        if self._logger.isEnabledFor(logging.INFO):
            for profile in profiles:
                self._logger.info("Get profile:")
                self._logger.info("\tssid: %s", profile.ssid)
                self._logger.info("\tauth: %s", profile.auth)
                self._logger.info("\takm: %s", profile.akm)
                self._logger.info("\tcipher: %s", profile.cipher)

        return profiles
105737
def _network_show(self, name, network_lst):
        '''
        
        '''
        for net in network_lst:
            if net.label == name:
                return net.__dict__
        return {}
663928
def _get_network(self, network_info):
        
        org_name = network_info.get('organizationName', '')
        part_name = network_info.get('partitionName', '')
        segment_id = network_info['segmentId']
        url = self._network_url % (org_name, part_name, segment_id)
        return self._send_request('GET', url, '', 'network')
624975
def list_subnets(self, retrieve_all=True, **_params):
        """"""
        return self.list('subnets', self.subnets_path, retrieve_all,
                         **_params)