Returns the subnetwork ID for the specified nodeId or 0 if non is associated e.g. because the
subnetwork is too small.
2693
public int getSubnetwork(int nodeId) {
        byte[] bytes = new byte[1];
        da.getBytes(nodeId, bytes, bytes.length);

        return (int) bytes[0];
    }
1121561
def get_subnetid(vm_):
    '''
    
    '''
    subnetid = config.get_cloud_config_value(
        'subnetid', vm_, __opts__, search_global=False
    )
    if subnetid:
        return subnetid

    subnetname = config.get_cloud_config_value(
        'subnetname', vm_, __opts__, search_global=False
    )
    if subnetname:
        return _get_subnetname_id(subnetname)
    return None
1220565
def getNetworkIDs(self):
        """"""

        res = []
        i = 0
        while True:
            netid = self.getValue("net_interface.%d.connection" % i)
            if not netid:
                return res
            res.append(netid)
            i += 1
452023
public int ENgetnodeindex( String id ) throws EpanetException {
        int[] index = new int[1];
        int error = epanet.ENgetnodeindex(id, index);
        checkError(error);
        return index[0];
    }
1200457
public String getClusterId(final String nodeId)
    {
        if (nodeId == null)
        {
            return null;
        }
        int dot = nodeId.lastIndexOf('.');
        return (dot > 0) ? nodeId.substring(0, dot) : nodeId;
    }
1227475
private Integer getKeyPartitionId(byte[] key) {
        Integer keyPartitionId = storeInstance.getNodesPartitionIdForKey(nodeId, key);

        Utils.notNull(keyPartitionId);
        return keyPartitionId;
    }
281362
def get_in_net_id(cls, tenant_id):
        
        if 'in' not in cls.ip_db_obj:
            LOG.error("Fabric not prepared for tenant %s", tenant_id)
            return None
        db_obj = cls.ip_db_obj.get('in')
        in_subnet_dict = cls.get_in_ip_addr(tenant_id)
        sub = db_obj.get_subnet(in_subnet_dict.get('subnet'))
        return sub.network_id
958959
public RemoteAddress getAddress(String nodeID) {
		NodeDescriptor node = nodes.get(nodeID);
		if (node == null) {
			return null;
		}
		RemoteAddress address;
		node.readLock.lock();
		try {
			address = new RemoteAddress(node.host, node.port);
		} finally {
			node.readLock.unlock();
		}
		return address;
	}
320074
@Nonnull
	public String getNodeId(final InetSocketAddress socketAddress) throws IllegalArgumentException {
		if ( socketAddress == null ) {
			throw new IllegalArgumentException("SocketAddress must not be null.");
		}
		final String result = _address2Ids.get( socketAddress );
		if ( result == null ) {
			throw new IllegalArgumentException("SocketAddress " + socketAddress + " not known (registered addresses: " + _address2Ids.keySet() + ").");
		}
		return result;
	}
617342
public RedisClusterNode getPartitionByNodeId(String nodeId) {

        for (RedisClusterNode partition : nodeReadView) {
            if (partition.getNodeId().equals(nodeId)) {
                return partition;
            }
        }

        return null;
    }
872085
public boolean hasNodeWithId(int nodeId) {
        Node node = nodesById.get(nodeId);
        if(node == null) {
            return false;
        }
        return true;
    }
121150
public static RedisClusterNode of(String nodeId) {

        LettuceAssert.notNull(nodeId, "NodeId must not be null");

        RedisClusterNode redisClusterNode = new RedisClusterNode();
        redisClusterNode.setNodeId(nodeId);

        return redisClusterNode;
    }
404402
def get_network_by_id(self, net_id):
        """"""

        for elem in self.networks:
            if elem.id == net_id:
                return elem
        return None
1140388
def get(self, node_id):
        
        if (self._registry[node_id].monotonic_timestamp + self.TIMEOUT) < time.monotonic():
            self._call_event_handlers(self.UpdateEvent(self._registry[node_id],
                                                       self.UpdateEvent.EVENT_ID_OFFLINE))
            del self._registry[node_id]
        return self._registry[node_id]
1372457
def get_node_id(nuc_or_sat, namespace=None):
    """"""
    node_type = get_node_type(nuc_or_sat)
    if node_type == 'leaf':
        leaf_id = nuc_or_sat[0].leaves()[0]
        if namespace is not None:
            return '{0}:{1}'.format(namespace, leaf_id)
        else:
            return string(leaf_id)

    #else: node_type == 'span'
    span_start = nuc_or_sat[0].leaves()[0]
    span_end = nuc_or_sat[0].leaves()[1]
    if namespace is not None:
        return '{0}:span:{1}-{2}'.format(namespace, span_start, span_end)
    else:
        return 'span:{0}-{1}'.format(span_start, span_end)
455731
public String getId(Node node) {
        String id = null;
        try {
            id = node.getIdentifier();
        } catch (RepositoryException e) {
            id = node.toString(); // use Java 'ID'
        }
        return id;
    }
525786
def get_node_id(edge, node_type):
    
    assert node_type in ('source', 'target')
    _, node_id_str = edge.attrib[node_type].split('.')  # e.g. //@nodes.251
    return int(node_id_str)