Set the network ID and Account ID.
11606
def get_ids(self):
        """"""
        response = api.request_networks(self)
        all_networks = []
        network_dict = {}
        for network, status in self.networks.items():
            if status['onboarded']:
                all_networks.append('{}'.format(network))
                network_dict[status['name']] = network

        # For the first onboarded network we find, grab the account id
        for resp in response['networks']:
            if str(resp['id']) in all_networks:
                self.account_id = resp['account_id']
                break

        self.network_ids = all_networks
        return network_dict
885634
def create_network(userid, os_version, network_info):
    
    print("\nConfiguring network interface for %s ..." % userid)
    network_create_info = client.send_request('guest_create_network_interface', 
                                              userid, os_version, network_info)

    if network_create_info['overallRC']:
        raise RuntimeError("Failed to create network for guest %s!\n%s" % 
                           (userid, network_create_info))
    else:
        print("Succeeded to create network for guest %s!" % userid)
1123369
def set_credentials(self, client_id=None, client_secret=None):
        
        self._client_id = client_id
        self._client_secret = client_secret

        # make sure to reset session due to credential change
        self._session = None
231472
def set_id(self,this_id):
        
        if self.type == 'NAF':
            return self.node.set('id',this_id)
        elif self.type == 'KAF':
            return self.node.set('wid',this_id)
404402
def get_network_by_id(self, net_id):
        """"""

        for elem in self.networks:
            if elem.id == net_id:
                return elem
        return None
1351676
def set_id(self,pid):
        
        if self.type == 'KAF':
            return self.node.set('pid',pid)
        elif self.type == 'NAF':
            return self.node.set('id',pid)
767340
def loadNetworkbyID(self, id, callback=None, errback=None):
        
        import ns1.ipam
        network = ns1.ipam.Network(self.config, id=id)
        return network.load(callback=callback, errback=errback)
787791
def on_connect(client):
    """"""
    client.nick(client.user.nick)
    client.userinfo(client.user.username, client.user.realname)
563923
def initialize(self):
        """"""
        self.network_status = self.get_network_status()
        self.name = self.network_status.get('network_name', 'Unknown')
        self.location_info = self.get_location_info()
        self.device_info = self.get_device_info()
        self.device_id = (
            self.device_info.get('device_id')
            if self.device_info else "Unknown")
        self.initialize_socket()
        self.initialize_worker()
        self.initialize_zones()
440592
def set_id(self,i):
        
        if self.type == 'NAF':
            self.node.set('id',i)
        elif self.type == 'KAF':
            self.node.set('mid',i)
874554
def set_id(self,my_id):
        
        if self.type == 'NAF':
            self.node.set('id',my_id)
        elif self.type == 'KAF':
            self.node.set('oid',my_id)
978541
def set_network(network, conf)
      @network = valid! network, valid_network(network, conf), :@network,
                        required: true,
                        required_error: 'channels must have a network',
                        invalid_error: 'invalid channel network %s'
    end
832686
def set_publicId(self,publicId):
        '''
        
        '''
        publicObj = self.get_public()
        if publicObj is not None:
            publicObj.set_publicid(publicId)
        else:
            publicObj = Cpublic()
            publicObj.set_publicid(publicId)
            self.set_public(publicObj)
114321
private void setupDefaultAccountInfoHandler() {
		final BitfinexAccountSymbol accountSymbol = BitfinexSymbols.account(BitfinexApiKeyPermissions.NO_PERMISSIONS);
		final AccountInfoHandler accountInfoHandler = new AccountInfoHandler(ACCCOUNT_INFO_CHANNEL, accountSymbol);
		accountInfoHandler.onHeartbeatEvent(timestamp -> this.updateConnectionHeartbeat());
		channelIdToHandlerMap.put(ACCCOUNT_INFO_CHANNEL, accountInfoHandler);
	}
258789
def setup_network_id_or_exit(
        config: Dict[str, Any],
        given_network_id: int,
        web3: Web3,
) -> Tuple[int, bool]:
    
    node_network_id = int(web3.version.network)  # pylint: disable=no-member
    known_given_network_id = given_network_id in ID_TO_NETWORKNAME
    known_node_network_id = node_network_id in ID_TO_NETWORKNAME

    if node_network_id != given_network_id:
        if known_given_network_id and known_node_network_id:
            click.secho(
                f"The chosen ethereum network '{ID_TO_NETWORKNAME[given_network_id]}' "
                f"differs from the ethereum client '{ID_TO_NETWORKNAME[node_network_id]}'. "
                "Please update your settings.",
                fg='red',
            )
        else:
            click.secho(
                f"The chosen ethereum network id '{given_network_id}' differs "
                f"from the ethereum client '{node_network_id}'. "
                "Please update your settings.",
                fg='red',
            )
        sys.exit(1)

    config['chain_id'] = given_network_id
    return given_network_id, known_node_network_id
494227
def SetCredentials(self, password=None, username=None):
    
    if password:
      self._password = password
    if username:
      self._user = username
137793
def create_network(self):
        """"""
        return Network(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)