def add_node(nm_host, hostname, description, groups=None, dry_run=False):
    '\n    add a node to NodeMeister\n\n    :param nm_host: NodeMeister hostname or IP\n    :type nm_host: string\n    :param hostname: hostname of the new node\n    :type hostname: string\n    :param description: description of the new node\n    :type description: string\n    :param groups: groups that this node is in\n    :type groups: list of int IDs\n    :param dry_run: if True, only print what would be done, do not make any changes\n    :type dry_run: boolean\n    :returns: int ID of the new node on success or False on failure\n    :rtype: int or False\n    '
    payload = {'hostname': hostname, 'description': description}
    if (groups is not None):
        payload['groups'] = groups
    url = ('http://%s/enc/nodes/' % nm_host)
    logger.debug('adding node {h}'.format(h=hostname))
    status_code = do_post(url, payload, dry_run=dry_run)
    if (status_code == 201):
        return get_nm_node_id(nm_host, hostname, dry_run=dry_run)
    logger.error(('ERROR: add_node got status code %d' % status_code))
    return False
add a node to NodeMeister

:param nm_host: NodeMeister hostname or IP
:type nm_host: string
:param hostname: hostname of the new node
:type hostname: string
:param description: description of the new node
:type description: string
:param groups: groups that this node is in
:type groups: list of int IDs
:param dry_run: if True, only print what would be done, do not make any changes
:type dry_run: boolean
:returns: int ID of the new node on success or False on failure
:rtype: int or False
def add_node(nm_host, hostname, description, groups=None, dry_run=False):
    '\n    add a node to NodeMeister\n\n    :param nm_host: NodeMeister hostname or IP\n    :type nm_host: string\n    :param hostname: hostname of the new node\n    :type hostname: string\n    :param description: description of the new node\n    :type description: string\n    :param groups: groups that this node is in\n    :type groups: list of int IDs\n    :param dry_run: if True, only print what would be done, do not make any changes\n    :type dry_run: boolean\n    :returns: int ID of the new node on success or False on failure\n    :rtype: int or False\n    '
    payload = {'hostname': hostname, 'description': description}
    if (groups is not None):
        payload['groups'] = groups
    url = ('http://%s/enc/nodes/' % nm_host)
    logger.debug('adding node {h}'.format(h=hostname))
    status_code = do_post(url, payload, dry_run=dry_run)
    if (status_code == 201):
        return get_nm_node_id(nm_host, hostname, dry_run=dry_run)
    logger.error(('ERROR: add_node got status code %d' % status_code))
    return False