Perform all checks on a host using acquired artifacts.

  Checks are selected based on the artifacts available and the host attributes
  (e.g. os_name/cpe/labels) provided as either parameters, or in the
  knowledgebase artifact.

  A KnowledgeBase artifact should be provided that contains, at a minimum:
  - OS
  - Hostname or IP
  Other knowldegebase attributes may be required for specific checks.

  CPE is currently unused, pending addition of a CPE module in the GRR client.

  Labels are arbitrary string labels attached to a client.

  Args:
    host_data: A dictionary with artifact names as keys, and rdf data as values.
    os_name: An OS name (optional).
    cpe: A CPE string (optional).
    labels: An iterable of labels (optional).
    exclude_checks: A list of check ids not to run. A check id in this list
                    will not get run even if included in restrict_checks.
    restrict_checks: A list of check ids that may be run, if appropriate.

  Returns:
    A CheckResults object that contains results for all checks that were
      performed on the host.

def CheckHost(host_data,
              os_name=None,
              cpe=None,
              labels=None,
              exclude_checks=None,
              restrict_checks=None):
  """Perform all checks on a host using acquired artifacts.

  Checks are selected based on the artifacts available and the host attributes
  (e.g. os_name/cpe/labels) provided as either parameters, or in the
  knowledgebase artifact.

  A KnowledgeBase artifact should be provided that contains, at a minimum:
  - OS
  - Hostname or IP
  Other knowldegebase attributes may be required for specific checks.

  CPE is currently unused, pending addition of a CPE module in the GRR client.

  Labels are arbitrary string labels attached to a client.

  Args:
    host_data: A dictionary with artifact names as keys, and rdf data as values.
    os_name: An OS name (optional).
    cpe: A CPE string (optional).
    labels: An iterable of labels (optional).
    exclude_checks: A list of check ids not to run. A check id in this list
                    will not get run even if included in restrict_checks.
    restrict_checks: A list of check ids that may be run, if appropriate.

  Returns:
    A CheckResults object that contains results for all checks that were
      performed on the host.
  """
  # Get knowledgebase, os_name from hostdata
  kb = host_data.get("KnowledgeBase")
  if os_name is None:
    os_name = kb.os
  if cpe is None:
    # TODO(user): Get CPE (requires new artifact/parser)
    pass
  if labels is None:
    # TODO(user): Get labels (see grr/lib/export.py for acquisition
    # from client)
    pass
  return CheckRegistry.Process(
      host_data,
      os_name=os_name,
      cpe=cpe,
      labels=labels,
      restrict_checks=restrict_checks,
      exclude_checks=exclude_checks)