def Parse(self, conditions, host_data):
    """Runs probes that evaluate whether collected data has an issue.

    Args:
      conditions: The trigger conditions.
      host_data: A map of artifacts and rdf data.

    Returns:
      Anomalies if an issue exists.
    """
    processed = []
    probes = self.triggers.Calls(conditions)
    for p in probes:
      # Get the data required for the probe. A probe can use a result_context
      # (e.g. Parsers, Anomalies, Raw), to identify the data that is needed
      # from the artifact collection results.
      artifact_data = host_data.get(p.artifact)
      if not p.result_context:
        rdf_data = artifact_data["PARSER"]
      else:
        rdf_data = artifact_data.get(str(p.result_context))
      try:
        result = p.Parse(rdf_data)
      except ProcessingError as e:
        raise ProcessingError("Bad artifact %s: %s" % (p.artifact, e))
      if result:
        processed.append(result)
    # Matcher compares the number of probes that triggered with results.
    return self.matcher.Detect(probes, processed)
def Parse ( self , conditions , host_data ) : processed = [ ] probes = self . triggers . Calls ( conditions ) for p in probes : artifact_data = host_data . get ( p . artifact ) if not p . result_context : rdf_data = artifact_data [ "PARSER" ] else : rdf_data = artifact_data . get ( str ( p . result_context ) ) try : result = p . Parse ( rdf_data ) except ProcessingError as e : raise ProcessingError ( "Bad artifact %s: %s" % ( p . artifact , e ) ) if result : processed . append ( result ) return self . matcher . Detect ( probes , processed )
Runs probes that evaluate whether collected data has an issue.

    Args:
      conditions: The trigger conditions.
      host_data: A map of artifacts and rdf data.

    Returns:
      Anomalies if an issue exists.