1 """ 2 This module contains the status enums for use by HostQueueEntrys in the 3 database. It is a stand alone module as these status strings are needed 4 from various disconnected pieces of code that should not depend on everything 5 that frontend.afe.models depends on such as RPC clients. 6 """ 7 8 from autotest_lib.client.common_lib import enum 9 10 Status_list = ['Queued', 'Starting', 'Resetting', 'Verifying', 'Provisioning', 11 'Pending', 'Running', 'Gathering', 'Parsing', 12 'Aborted', 'Completed', 'Failed', 'Stopped', 13 'Cleaning', 'Template'] 14 15 Status = enum.Enum(*Status_list, string_values=True) 16 ACTIVE_STATUSES = (Status.STARTING, Status.RESETTING, Status.VERIFYING, 17 Status.PROVISIONING, Status.PENDING, Status.RUNNING, 18 Status.GATHERING, Status.CLEANING) 19 COMPLETE_STATUSES = (Status.ABORTED, Status.COMPLETED, Status.FAILED, 20 Status.STOPPED, Status.TEMPLATE) 21 PRE_JOB_STATUSES = (Status.RESETTING, Status.PROVISIONING, Status.VERIFYING, 22 Status.PENDING, Status.QUEUED) 23 IDLE_PRE_JOB_STATUSES = (Status.PENDING, Status.QUEUED) 24 25 IntStatus = enum.Enum(*Status_list) 26