blob: e76dba139574f7270e65fa40c0d6ebc0248f3cc6 [file] [log] [blame]
Fang Deng042c1472014-10-23 13:56:41 -07001# 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"""
6This module contains the status enums for use by Hosts in the
7database. It is a stand alone module as these status strings
8are need from vairous disconnected pieces of code.
9"""
10
11from autotest_lib.client.common_lib import enum
12
13Status = enum.Enum('Verifying', 'Running', 'Ready', 'Repairing',
14'Repair Failed', 'Cleaning', 'Pending', 'Resetting',
15'Provisioning', string_values=True)
Richard Barnette17bfc6c2016-08-04 18:41:43 -070016
17# States associated with a DUT that is doing nothing, whether or not
18# it's eligible to run a test.
Allen Li6a612392016-08-18 12:09:32 -070019IDLE_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.
23UNAVAILABLE_STATES = {Status.REPAIR_FAILED, Status.REPAIRING, Status.VERIFYING}