Fang Deng | 042c147 | 2014-10-23 13:56:41 -0700 | [diff] [blame] | 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) |
Richard Barnette | 17bfc6c | 2016-08-04 18:41:43 -0700 | [diff] [blame] | 16 | |
| 17 | # States associated with a DUT that is doing nothing, whether or not |
| 18 | # it's eligible to run a test. |
Allen Li | 6a61239 | 2016-08-18 12:09:32 -0700 | [diff] [blame] | 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} |