autotest: Mark DUT as needs_deploy if found mismatch
Deploy set HWID and SerialNumber for the DUT.
We will mark DUT as needs_deploy if serial-number mismatch or hwid/serial-number are missing in host_info.
BUG=b:169286392
TEST=run local
./server/autoserv -s --host-info-subdir host_info_store -m chromeos1-row4-rack4-host3 --lab True --local-only-host-info True -R -r /tr/
Change-Id: I1afcb30a96af27eda3582f8671c5b3308e34d2d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2559594
Tested-by: Otabek Kasimov <otabek@google.com>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Gregory Nisbet <gregorynisbet@google.com>
Reviewed-by: Garry Wang <xianuowang@chromium.org>
Commit-Queue: Otabek Kasimov <otabek@google.com>
diff --git a/server/hosts/cros_constants.py b/server/hosts/cros_constants.py
index 0eabfb4..0815d91 100644
--- a/server/hosts/cros_constants.py
+++ b/server/hosts/cros_constants.py
@@ -6,6 +6,8 @@
DEVICE_STATE_NEEDS_REPLACEMENT = 'needs_replacement'
# Device required manual attention to be fixed
DEVICE_STATE_NEEDS_MANUAL_REPAIR = 'needs_manual_repair'
+# Device required re-deployment to be fixed
+DEVICE_STATE_NEEDS_DEPLOY = 'needs_deploy'
# Timeout for verifiers.
SHORT_VERIFY_TIMEOUT_SEC = 60