Send my facts to a remote host

    if remote_host is provided, data will be sent to that host. Otherwise it will be sent to master.

def send(remote_host=None):
    """ Send my facts to a remote host

    if remote_host is provided, data will be sent to that host. Otherwise it will be sent to master.
    """
    my_facts = get()
    if not remote_host:
        remote_host = nago.extensions.settings.get('server')
    remote_node = nago.core.get_node(remote_host)
    if not remote_node:
        raise Exception("Remote host with token='%s' not found" % remote_host)
    response = remote_node.send_command('facts', 'post', host_token=remote_node.token, **my_facts)
    result = {}
    result['server_response'] = response
    result['message'] = "sent %s facts to remote node '%s'" % (len(my_facts), remote_node.get('host_name'))
    return result