autotest: Add new servo state constants and replace old usage
NO_SSH
./server/autoserv -s --host-info-subdir host_info_store -m chromeos1-row4-rack1-host4 --lab True --local-only-host-info True -v -r /tr/
good one
./server/autoserv -s --host-info-subdir host_info_store -m chromeos1-row4-rack5-host1 --lab True --local-only-host-info True -v -r /tr/
missing_config
./server/autoserv -s --host-info-subdir host_info_store -m chromeos1-row4-rack1-host1 --lab True --local-only-host-info True -v -r /tr/
BUG=chromium:1088279
TEST=run local
Change-Id: I3dae64090fd4d77e5b30889e68484a4313c7f978
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2262274
Tested-by: Otabek Kasimov <otabek@google.com>
Reviewed-by: Garry Wang <xianuowang@chromium.org>
Commit-Queue: Otabek Kasimov <otabek@google.com>
diff --git a/server/hosts/servo_constants.py b/server/hosts/servo_constants.py
index 0e1fbb5..82875f7 100644
--- a/server/hosts/servo_constants.py
+++ b/server/hosts/servo_constants.py
@@ -40,11 +40,21 @@
SERVO_TYPE_LABEL_PREFIX = 'servo_type'
SERVO_STATE_LABEL_PREFIX = 'servo_state'
-SERVO_STATE_WORKING = 'WORKING'
-SERVO_STATE_BROKEN = 'BROKEN'
-SERVO_STATE_NOT_CONNECTED = 'NOT_CONNECTED'
-SERVO_STATE_WRONG_CONFIG = 'WRONG_CONFIG'
+
+# constants to support whole list of states for servo
SERVO_STATE_UNKNOWN = 'UNKNOWN'
+SERVO_STATE_MISSING_CONFIG = 'MISSING_CONFIG'
+SERVO_STATE_WRONG_CONFIG = 'WRONG_CONFIG'
+SERVO_STATE_NO_SSH = 'NO_SSH'
+SERVO_STATE_NOT_CONNECTED = 'NOT_CONNECTED'
+SERVO_STATE_NEED_REPLACEMENT = 'NEED_REPLACEMENT'
+SERVO_STATE_CCD_TESTLAB_ISSUE = 'CCD_TESTLAB_ISSUE'
+SERVO_STATE_SERVOD_ISSUE = 'SERVOD_ISSUE'
+SERVO_STATE_LID_OPEN_FAILED = 'LID_OPEN_FAILED'
+SERVO_STATE_BAD_RIBBON_CABLE = 'BAD_RIBBON_CABLE'
+SERVO_STATE_EC_BROKEN = 'EC_BROKEN'
+SERVO_STATE_BROKEN = 'BROKEN'
+SERVO_STATE_WORKING = 'WORKING'
# constants to support reset servo via smart usbhub.
SMART_USBHUB_LABEL = 'smart_usbhub'