parameters: (value, source, ctype, threat_type, attack_type,
                           user, status=None, source_method=None, source_reference=None,
                           source_tlp=None, add_domain=False, add_relationship=False, campaign=None,
                           campaign_confidence=None, confidence=None,
                           description=None, impact=None,
                           bucket_list=None, ticket=None, cache={},
                           related_id=None, related_type=None, relationship_type=None)
return_statement: return result
docstring: Handle adding an individual indicator.
  
      :param value: The indicator value.
      :type value: str
      :param source: The name of the source for this indicator.
      :type source: str
      :param ctype: The indicator type.
      :type ctype: str
      :param threat_type: The indicator threat type.
      :type threat_type: str
      :param attack_type: The indicator attack type.
      :type attack_type: str
      :param user: The user adding this indicator.
      :type user: CRITsUser
      :param method: The method of acquisition of this indicator.
      :type method: str
      :param reference: The reference to this data.
      :type reference: str
      :param add_domain: If the indicators being added are also other top-level
                         objects, add those too.
      :type add_domain: boolean
      :param add_relationship: If a relationship can be made, create it.
      :type add_relationship: boolean
      :param campaign: Campaign to attribute to this indicator.
      :type campaign: str
      :param campaign_confidence: Confidence of this campaign.
      :type campaign_confidence: str
      :param confidence: Indicator confidence.
      :type confidence: str
      :param description: The description of this data.
      :type description: str
      :param impact: Indicator impact.
      :type impact: str
      :param bucket_list: The bucket(s) to assign to this indicator.
      :type bucket_list: str
      :param ticket: Ticket to associate with this indicator.
      :type ticket: str
      :param cache: Cached data, typically for performance enhancements
                    during bulk uperations.
      :type cache: dict
      :param related_id: ID for object to create relationship with
      :type cache: str
      :param related_type: Type of object to create relationship with
      :type cache: str
      :param relationship_type: Type of relationship to create
      :type cache: str
      :returns: dict with keys "success" (boolean) and "message" (str)
docstring_summary: Handle adding an individual indicator.
docstring_tokens: Handle adding an individual indicator .
function: def handle_indicator_ind(value, source, ctype, threat_type, attack_type,
                           user, status=None, source_method=None, source_reference=None,
                           source_tlp=None, add_domain=False, add_relationship=False, campaign=None,
                           campaign_confidence=None, confidence=None,
                           description=None, impact=None,
                           bucket_list=None, ticket=None, cache={},
                           related_id=None, related_type=None, relationship_type=None):
      """
      Handle adding an individual indicator.
  
      :param value: The indicator value.
      :type value: str
      :param source: The name of the source for this indicator.
      :type source: str
      :param ctype: The indicator type.
      :type ctype: str
      :param threat_type: The indicator threat type.
      :type threat_type: str
      :param attack_type: The indicator attack type.
      :type attack_type: str
      :param user: The user adding this indicator.
      :type user: CRITsUser
      :param method: The method of acquisition of this indicator.
      :type method: str
      :param reference: The reference to this data.
      :type reference: str
      :param add_domain: If the indicators being added are also other top-level
                         objects, add those too.
      :type add_domain: boolean
      :param add_relationship: If a relationship can be made, create it.
      :type add_relationship: boolean
      :param campaign: Campaign to attribute to this indicator.
      :type campaign: str
      :param campaign_confidence: Confidence of this campaign.
      :type campaign_confidence: str
      :param confidence: Indicator confidence.
      :type confidence: str
      :param description: The description of this data.
      :type description: str
      :param impact: Indicator impact.
      :type impact: str
      :param bucket_list: The bucket(s) to assign to this indicator.
      :type bucket_list: str
      :param ticket: Ticket to associate with this indicator.
      :type ticket: str
      :param cache: Cached data, typically for performance enhancements
                    during bulk uperations.
      :type cache: dict
      :param related_id: ID for object to create relationship with
      :type cache: str
      :param related_type: Type of object to create relationship with
      :type cache: str
      :param relationship_type: Type of relationship to create
      :type cache: str
      :returns: dict with keys "success" (boolean) and "message" (str)
      """
  
      result = None
  
      if not source:
          return {"success" : False, "message" : "Missing source information."}
  
      if threat_type is None:
          threat_type = IndicatorThreatTypes.UNKNOWN
      if attack_type is None:
          attack_type = IndicatorAttackTypes.UNKNOWN
      if description is None:
          description = ''
      if status is None:
          status = Status.NEW
  
      if value == None or value.strip() == "":
          result = {'success': False,
                    'message': "Can't create indicator with an empty value field"}
      elif ctype == None or ctype.strip() == "":
          result = {'success': False,
                    'message': "Can't create indicator with an empty type field"}
      else:
          ind = {}
          ind['type'] = ctype.strip()
          ind['threat_types'] = [threat_type.strip()]
          ind['attack_types'] = [attack_type.strip()]
          ind['value'] = value.strip()
          ind['lower'] = value.lower().strip()
          ind['description'] = description.strip()
          ind['status'] = status
  
          if campaign:
              ind['campaign'] = campaign
          if campaign_confidence and campaign_confidence in ('low', 'medium', 'high'):
              ind['campaign_confidence'] = campaign_confidence
          if confidence and confidence in ('unknown', 'benign', 'low', 'medium',
                                           'high'):
              ind['confidence'] = confidence
          if impact and impact in ('unknown', 'benign', 'low', 'medium', 'high'):
              ind['impact'] = impact
          if bucket_list:
              ind[form_consts.Common.BUCKET_LIST_VARIABLE_NAME] = bucket_list
          if ticket:
              ind[form_consts.Common.TICKET_VARIABLE_NAME] = ticket
  
          try:
              return handle_indicator_insert(ind, source, source_reference=source_reference,
                                             source_method=source_method, source_tlp=source_tlp,
                                             user=user, add_domain=add_domain,
                                             add_relationship=add_relationship, cache=cache,
                                             related_id=related_id, related_type=related_type,
                                             relationship_type=relationship_type)
          except Exception, e:
              return {'success': False, 'message': repr(e)}
  
      return result
function_tokens: def handle_indicator_ind ( value , source , ctype , threat_type , attack_type , user , status = None , source_method = None , source_reference = None , source_tlp = None , add_domain = False , add_relationship = False , campaign = None , campaign_confidence = None , confidence = None , description = None , impact = None , bucket_list = None , ticket = None , cache = { } , related_id = None , related_type = None , relationship_type = None ) : result = None if not source : return { "success" : False , "message" : "Missing source information." } if threat_type is None : threat_type = IndicatorThreatTypes . UNKNOWN if attack_type is None : attack_type = IndicatorAttackTypes . UNKNOWN if description is None : description = '' if status is None : status = Status . NEW if value == None or value . strip ( ) == "" : result = { 'success' : False , 'message' : "Can't create indicator with an empty value field" } elif ctype == None or ctype . strip ( ) == "" : result = { 'success' : False , 'message' : "Can't create indicator with an empty type field" } else : ind = { } ind [ 'type' ] = ctype . strip ( ) ind [ 'threat_types' ] = [ threat_type . strip ( ) ] ind [ 'attack_types' ] = [ attack_type . strip ( ) ] ind [ 'value' ] = value . strip ( ) ind [ 'lower' ] = value . lower ( ) . strip ( ) ind [ 'description' ] = description . strip ( ) ind [ 'status' ] = status if campaign : ind [ 'campaign' ] = campaign if campaign_confidence and campaign_confidence in ( 'low' , 'medium' , 'high' ) : ind [ 'campaign_confidence' ] = campaign_confidence if confidence and confidence in ( 'unknown' , 'benign' , 'low' , 'medium' , 'high' ) : ind [ 'confidence' ] = confidence if impact and impact in ( 'unknown' , 'benign' , 'low' , 'medium' , 'high' ) : ind [ 'impact' ] = impact if bucket_list : ind [ form_consts . Common . BUCKET_LIST_VARIABLE_NAME ] = bucket_list if ticket : ind [ form_consts . Common . TICKET_VARIABLE_NAME ] = ticket try : return handle_indicator_insert ( ind , source , source_reference = source_reference , source_method = source_method , source_tlp = source_tlp , user = user , add_domain = add_domain , add_relationship = add_relationship , cache = cache , related_id = related_id , related_type = related_type , relationship_type = relationship_type ) except Exception , e : return { 'success' : False , 'message' : repr ( e ) } return result