Beispiel #1
0
    def get_downloader_script(search_task_document_id):
        """
        @param search_task_document_id: id of a document with search results
        @type search_task_document_id: basestring
        @return: code for downloading found events.
        @rtype: basestring
        """
        all_events = backend.get_search_result(search_task_document_id, None,
                                               0)
        return '''#!/bin/sh
wget events://{0}'''.format('+'.join(e.get('rawID', '') for e in all_events))
Beispiel #2
0
    def get_downloader_script(search_task_document_id):
        """
        @param search_task_document_id: id of a document with search results
        @type search_task_document_id: basestring
        @return: code for downloading found events.
        @rtype: basestring
        """
        all_events = backend.get_search_result(search_task_document_id,
                                               None, 0)
        return '''#!/bin/sh
wget events://{0}'''.format('+'.join(e.get('rawID', '') for e in all_events))
Beispiel #3
0
    def get(self, limit=None, offset=None):
        """
        Fetch search results.

        @param limit: output not more than limit events
        @type limit: int
        @param offset: output events starting from offset'th
        @type offset: int
        @returns: a list of events
        @rtype: list
        """
        return backend.get_search_result(self.related_uuid, limit, offset)
Beispiel #4
0
    def get(self, limit=None, offset=None):
        """
        Fetch search results.

        @param limit: output not more than limit events
        @type limit: int
        @param offset: output events starting from offset'th
        @type offset: int
        @returns: a list of events
        @rtype: list
        """
        return backend.get_search_result(self.related_uuid, limit, offset)