(data, analyst, message_id, hostname, feed, block_label,
                       begin=None, end=None, poll_time=None, use_hdr_src=False,
                       errors=[])
Take the given standards data and save it in the DB

    :param data: Content being saved
    :type data: string
    :param analyst: Userid of the analyst who polled the data
    :type analyst: string
    :param message_id: ID of the TAXII message from which this content came
    :type message_id: string
    :param hostname: Hostname of the TAXII server from which this content came
    :type hostname: string
    :param feed: Feed/collection from which this data was polled
    :type feed: string
    :param block_label: STIX filename, or when block submitted to TAXII server
    :type block_label: string
    :param begin: Exclusive begin component of the timerange that was polled
    :type begin: :class:`datetime.datetime`
    :param end: Inclusive end component of the timerange that was polled
    :type end: :class:`datetime.datetime`
    :param poll_time: Timestamp representing when this data was polled
    :type poll_time: :class:`datetime.datetime`
    :param use_hdr_src: If True, try to use the STIX Header Information Source
                         instead of the value in "source" parameter
    :type use_hdr_src: boolean
    :param errors: List of errors
    :type errors: list
    :returns: Nothing
Take the given standards data and save it in the DB
Take the given standards data and save it in the DB
def save_standards_doc(data, analyst, message_id, hostname, feed, block_label,
                       begin=None, end=None, poll_time=None, use_hdr_src=False,
                       errors=[]):
    """
    Take the given standards data and save it in the DB

    :param data: Content being saved
    :type data: string
    :param analyst: Userid of the analyst who polled the data
    :type analyst: string
    :param message_id: ID of the TAXII message from which this content came
    :type message_id: string
    :param hostname: Hostname of the TAXII server from which this content came
    :type hostname: string
    :param feed: Feed/collection from which this data was polled
    :type feed: string
    :param block_label: STIX filename, or when block submitted to TAXII server
    :type block_label: string
    :param begin: Exclusive begin component of the timerange that was polled
    :type begin: :class:`datetime.datetime`
    :param end: Inclusive end component of the timerange that was polled
    :type end: :class:`datetime.datetime`
    :param poll_time: Timestamp representing when this data was polled
    :type poll_time: :class:`datetime.datetime`
    :param use_hdr_src: If True, try to use the STIX Header Information Source
                         instead of the value in "source" parameter
    :type use_hdr_src: boolean
    :param errors: List of errors
    :type errors: list
    :returns: Nothing
    """

    if data or errors:
        taxii_content = taxii.TaxiiContent()
        taxii_content.taxii_msg_id = message_id
        taxii_content.hostname = hostname
        taxii_content.use_hdr_src = use_hdr_src
        taxii_content.feed = feed
        taxii_content.block_label = block_label
        taxii_content.poll_time = poll_time or datetime.now()
        if end: # TAXII poll will always have end timestamp
            end = end.strftime('%Y-%m-%d %H:%M:%S')
            begin = begin.strftime('%Y-%m-%d %H:%M:%S') if begin else 'None'
            taxii_content.timerange = '%s to %s' % (begin, end)
        else: # Must be a STIX file upload
            taxii_content.timerange = 'STIX File Upload'
        taxii_content.analyst = analyst
        taxii_content.content = data or ""
        taxii_content.errors = errors
        taxii_content.import_failed = False
        taxii_content.save()
def save_standards_doc ( data , analyst , message_id , hostname , feed , block_label , begin = None , end = None , poll_time = None , use_hdr_src = False , errors = [ ] ) : if data or errors : taxii_content = taxii . TaxiiContent ( ) taxii_content . taxii_msg_id = message_id taxii_content . hostname = hostname taxii_content . use_hdr_src = use_hdr_src taxii_content . feed = feed taxii_content . block_label = block_label taxii_content . poll_time = poll_time or datetime . now ( ) if end : # TAXII poll will always have end timestamp end = end . strftime ( '%Y-%m-%d %H:%M:%S' ) begin = begin . strftime ( '%Y-%m-%d %H:%M:%S' ) if begin else 'None' taxii_content . timerange = '%s to %s' % ( begin , end ) else : # Must be a STIX file upload taxii_content . timerange = 'STIX File Upload' taxii_content . analyst = analyst taxii_content . content = data or "" taxii_content . errors = errors taxii_content . import_failed = False taxii_content . save ( )