def get_nm_node_id(nm_host, hostname, nodenames=None, dry_run=False):
    '\n    Get the node ID of a node specified by hostname\n\n    :param nm_host: NodeMeister hostname or IP\n    :type nm_host: string\n    :param hostname: hostname of the node\n    :type hostname: string\n    :param nodenames: dict of nodes as returned by get_node_names()\n    :type nodenames: dict\n    :returns: int ID of the group or False on failure\n    :rtype: int or False\n    '
    if dry_run:
        return 0
    if (nodenames is None):
        nodenames = get_node_names(nm_host)
    for n in nodenames:
        if (nodenames[n] == hostname):
            return n
    logger.error('could not find node ID for {h}'.format(h=hostname))
    return False
Get the node ID of a node specified by hostname

:param nm_host: NodeMeister hostname or IP
:type nm_host: string
:param hostname: hostname of the node
:type hostname: string
:param nodenames: dict of nodes as returned by get_node_names()
:type nodenames: dict
:returns: int ID of the group or False on failure
:rtype: int or False
def get_nm_node_id(nm_host, hostname, nodenames=None, dry_run=False):
    '\n    Get the node ID of a node specified by hostname\n\n    :param nm_host: NodeMeister hostname or IP\n    :type nm_host: string\n    :param hostname: hostname of the node\n    :type hostname: string\n    :param nodenames: dict of nodes as returned by get_node_names()\n    :type nodenames: dict\n    :returns: int ID of the group or False on failure\n    :rtype: int or False\n    '
    if dry_run:
        return 0
    if (nodenames is None):
        nodenames = get_node_names(nm_host)
    for n in nodenames:
        if (nodenames[n] == hostname):
            return n
    logger.error('could not find node ID for {h}'.format(h=hostname))
    return False