grr/server/grr_response_server/client_report_utils.py
def _GetAFF4AttributeForReportType(
    report_type):
  """Returns the corresponding AFF4 attribute for the given report type."""
  if report_type == rdf_stats.ClientGraphSeries.ReportType.GRR_VERSION:
    return aff4_stats.ClientFleetStats.SchemaCls.GRRVERSION_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.OS_TYPE:
    return aff4_stats.ClientFleetStats.SchemaCls.OS_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.OS_RELEASE:
    return aff4_stats.ClientFleetStats.SchemaCls.RELEASE_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.N_DAY_ACTIVE:
    return aff4_stats.ClientFleetStats.SchemaCls.LAST_CONTACTED_HISTOGRAM
  else:
    raise ValueError("Unknown report type %s." % report_type)
Returns the corresponding AFF4 attribute for the given report type.
Returns the corresponding AFF4 attribute for the given report type.
Returns the corresponding AFF4 attribute for the given report type .
def _GetAFF4AttributeForReportType(
    report_type):
  if report_type == rdf_stats.ClientGraphSeries.ReportType.GRR_VERSION:
    return aff4_stats.ClientFleetStats.SchemaCls.GRRVERSION_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.OS_TYPE:
    return aff4_stats.ClientFleetStats.SchemaCls.OS_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.OS_RELEASE:
    return aff4_stats.ClientFleetStats.SchemaCls.RELEASE_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.N_DAY_ACTIVE:
    return aff4_stats.ClientFleetStats.SchemaCls.LAST_CONTACTED_HISTOGRAM
  else:
    raise ValueError("Unknown report type %s." % report_type)
def _GetAFF4AttributeForReportType ( report_type ) : if report_type == rdf_stats . ClientGraphSeries . ReportType . GRR_VERSION : return aff4_stats . ClientFleetStats . SchemaCls . GRRVERSION_HISTOGRAM elif report_type == rdf_stats . ClientGraphSeries . ReportType . OS_TYPE : return aff4_stats . ClientFleetStats . SchemaCls . OS_HISTOGRAM elif report_type == rdf_stats . ClientGraphSeries . ReportType . OS_RELEASE : return aff4_stats . ClientFleetStats . SchemaCls . RELEASE_HISTOGRAM elif report_type == rdf_stats . ClientGraphSeries . ReportType . N_DAY_ACTIVE : return aff4_stats . ClientFleetStats . SchemaCls . LAST_CONTACTED_HISTOGRAM else : raise ValueError ( "Unknown report type %s." % report_type )
Returns the corresponding AFF4 attribute for the given report type.
Returns the corresponding AFF4 attribute for the given report type .
"""Returns the corresponding AFF4 attribute for the given report type."""
report_type