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"""
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 autotest_enum
12
13Status = autotest_enum.AutotestEnum('Verifying', 'Running', 'Ready',
14                                    'Repairing', 'Repair Failed', 'Cleaning',
15                                    'Pending', 'Resetting', 'Provisioning',
16                                    string_values=True)
17
18# States associated with a DUT that is doing nothing, whether or not
19# it's eligible to run a test.
20IDLE_STATES = {Status.READY, Status.REPAIR_FAILED}
21
22# States associated with a DUT that is not available for jobs.  Note that a
23# locked host is also unavailable no matter the status.
24UNAVAILABLE_STATES = {Status.REPAIR_FAILED, Status.REPAIRING, Status.VERIFYING}
25