Home | History | Annotate | Download | only in common_lib
      1 # Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 """
      6 This module contains the status enums for use by Hosts in the
      7 database. It is a stand alone module as these status strings
      8 are need from vairous disconnected pieces of code.
      9 """
     10 
     11 from autotest_lib.client.common_lib import enum
     12 
     13 Status = enum.Enum('Verifying', 'Running', 'Ready', 'Repairing',
     14 'Repair Failed', 'Cleaning', 'Pending', 'Resetting',
     15 'Provisioning', string_values=True)
     16 
     17 # States associated with a DUT that is doing nothing, whether or not
     18 # it's eligible to run a test.
     19 IDLE_STATES = {Status.READY, Status.REPAIR_FAILED}
     20 
     21 # States associated with a DUT that is not available for jobs.  Note that a
     22 # locked host is also unavailable no matter the status.
     23 UNAVAILABLE_STATES = {Status.REPAIR_FAILED, Status.REPAIRING, Status.VERIFYING}
     24