inventory: Add new peripheral states for servo
Merge before https://crrev.com/c/2223830
BUG=chromium:1088279
TEST=presubmit
Change-Id: I58ea81189348352c68c2e8885b4f9127839105b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2224343
Commit-Queue: Otabek Kasimov <otabek@google.com>
Tested-by: Otabek Kasimov <otabek@google.com>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/go/lab/dut_state.pb.go b/go/lab/dut_state.pb.go
index 15a7cfb..fbf31df 100644
--- a/go/lab/dut_state.pb.go
+++ b/go/lab/dut_state.pb.go
@@ -20,32 +20,69 @@
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
-// Next Tag: 5
+// Next Tag: 13
type PeripheralState int32
const (
- // keep for all unknown states except working & not_connected.
- PeripheralState_UNKNOWN PeripheralState = 0
- PeripheralState_WORKING PeripheralState = 1
+ // Please keep for all unknown states.
+ PeripheralState_UNKNOWN PeripheralState = 0
+ // Device and software on it is working as expected.
+ PeripheralState_WORKING PeripheralState = 1
+ // Configuration for device is not provided.
+ PeripheralState_MISSING_CONFIG PeripheralState = 5
+ // Configuration contains incorrect information.
+ PeripheralState_WRONG_CONFIG PeripheralState = 4
+ // Device is not connected/plugged.
PeripheralState_NOT_CONNECTED PeripheralState = 2
- PeripheralState_BROKEN PeripheralState = 3
- PeripheralState_WRONG_CONFIG PeripheralState = 4
+ // Device is not reachable over ssh.
+ PeripheralState_NO_SSH PeripheralState = 6
+ // Device is broken or not working as expected. the state used if no specified state for the issue.
+ PeripheralState_BROKEN PeripheralState = 3
+ // Device cannot be repaired or required manual attention to fix/replace it.
+ PeripheralState_NEED_REPLACEMENT PeripheralState = 7
+ // Servo specific states.
+ // Servod daemon cannot start on servo-host because cr50 testlab not enabled.
+ PeripheralState_CCD_TESTLAB_ISSUE PeripheralState = 8
+ // Servod daemon cannot start on servo-host.
+ PeripheralState_SERVOD_ISSUE PeripheralState = 9
+ // device lid is not open.
+ PeripheralState_LID_OPEN_FAILED PeripheralState = 10
+ // the ribbon cable between servo and DUT is broken or not connected.
+ PeripheralState_BAD_RIBBON_CABLE PeripheralState = 11
+ // the EC on the DUT has issue.
+ PeripheralState_EC_BROKEN PeripheralState = 12
)
var PeripheralState_name = map[int32]string{
- 0: "UNKNOWN",
- 1: "WORKING",
- 2: "NOT_CONNECTED",
- 3: "BROKEN",
- 4: "WRONG_CONFIG",
+ 0: "UNKNOWN",
+ 1: "WORKING",
+ 5: "MISSING_CONFIG",
+ 4: "WRONG_CONFIG",
+ 2: "NOT_CONNECTED",
+ 6: "NO_SSH",
+ 3: "BROKEN",
+ 7: "NEED_REPLACEMENT",
+ 8: "CCD_TESTLAB_ISSUE",
+ 9: "SERVOD_ISSUE",
+ 10: "LID_OPEN_FAILED",
+ 11: "BAD_RIBBON_CABLE",
+ 12: "EC_BROKEN",
}
var PeripheralState_value = map[string]int32{
- "UNKNOWN": 0,
- "WORKING": 1,
- "NOT_CONNECTED": 2,
- "BROKEN": 3,
- "WRONG_CONFIG": 4,
+ "UNKNOWN": 0,
+ "WORKING": 1,
+ "MISSING_CONFIG": 5,
+ "WRONG_CONFIG": 4,
+ "NOT_CONNECTED": 2,
+ "NO_SSH": 6,
+ "BROKEN": 3,
+ "NEED_REPLACEMENT": 7,
+ "CCD_TESTLAB_ISSUE": 8,
+ "SERVOD_ISSUE": 9,
+ "LID_OPEN_FAILED": 10,
+ "BAD_RIBBON_CABLE": 11,
+ "EC_BROKEN": 12,
}
func (x PeripheralState) String() string {
@@ -274,43 +311,48 @@
func init() { proto.RegisterFile("lab/dut_state.proto", fileDescriptor_bfe5ddd3f74c848d) }
var fileDescriptor_bfe5ddd3f74c848d = []byte{
- // 600 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x6f, 0x4f, 0x1a, 0x4f,
- 0x10, 0xc7, 0x3d, 0x10, 0x95, 0x51, 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,
- 0xd3, 0x87, 0xaa, 0xd2, 0xc3, 0xda, 0x73, 0xa0, 0x92, 0x5a, 0x34, 0xfe, 0xa1, 0x45, 0xcd, 0x7c,
- 0xcf, 0xda, 0x50, 0xd5, 0x62, 0x11, 0x04, 0x1b, 0x26, 0xfa, 0xf0, 0x2b, 0x00, 0x00, 0xff, 0xff,
- 0x19, 0x0c, 0x6a, 0x0c, 0xe6, 0x03, 0x00, 0x00,
+ // 687 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xdf, 0x6f, 0xe2, 0x46,
+ 0x10, 0xc7, 0xcf, 0x70, 0x90, 0x30, 0x81, 0x63, 0x6f, 0xb9, 0xdc, 0xb9, 0x55, 0x2b, 0x45, 0x91,
+ 0x2a, 0x45, 0x91, 0x0a, 0xa7, 0x54, 0x69, 0xab, 0xbc, 0xf9, 0xc7, 0x26, 0x58, 0x38, 0x6b, 0x6b,
+ 0xed, 0x80, 0xda, 0x97, 0x95, 0x8d, 0xb7, 0x60, 0xc5, 0x61, 0x91, 0x6d, 0x88, 0xf2, 0xdf, 0xf4,
+ 0x9f, 0xec, 0x7b, 0xe5, 0x85, 0x04, 0x9a, 0xea, 0xf2, 0xb6, 0xf3, 0x9d, 0xef, 0x67, 0x67, 0x67,
+ 0x46, 0x5a, 0xe8, 0x65, 0x51, 0x3c, 0x48, 0x56, 0x25, 0x2f, 0xca, 0xa8, 0x14, 0xfd, 0x65, 0x2e,
+ 0x4b, 0x89, 0xeb, 0x59, 0x14, 0x7f, 0xff, 0x43, 0x95, 0x99, 0xce, 0x73, 0xf9, 0x20, 0x64, 0xc1,
+ 0x13, 0xb1, 0x4e, 0xa7, 0x82, 0xa7, 0xc9, 0xc6, 0x72, 0xfa, 0x77, 0x03, 0x0e, 0xed, 0x55, 0x19,
+ 0x54, 0x14, 0xfe, 0x09, 0x6a, 0x69, 0xa2, 0x6b, 0x27,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e8,
+ 0x97, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0x10, 0x1d, 0xb7, 0x80, 0x04, 0x00, 0x00,
}
diff --git a/src/lab/dut_state.proto b/src/lab/dut_state.proto
index ed99ada..e80bb2d 100644
--- a/src/lab/dut_state.proto
+++ b/src/lab/dut_state.proto
@@ -53,14 +53,36 @@
HardwareState servo_usb_state = 9;
}
-// Next Tag: 5
+// Next Tag: 13
enum PeripheralState {
- // keep for all unknown states except working & not_connected.
+ // Please keep for all unknown states.
UNKNOWN = 0;
+ // Device and software on it is working as expected.
WORKING = 1;
- NOT_CONNECTED = 2;
- BROKEN = 3;
+ // Configuration for device is not provided.
+ MISSING_CONFIG = 5;
+ // Configuration contains incorrect information.
WRONG_CONFIG = 4;
+ // Device is not connected/plugged.
+ NOT_CONNECTED = 2;
+ // Device is not reachable over ssh.
+ NO_SSH = 6;
+ // Device is broken or not working as expected. the state used if no specified state for the issue.
+ BROKEN = 3;
+ // Device cannot be repaired or required manual attention to fix/replace it.
+ NEED_REPLACEMENT = 7;
+
+ // Servo specific states.
+ // Servod daemon cannot start on servo-host because cr50 testlab not enabled.
+ CCD_TESTLAB_ISSUE = 8;
+ // Servod daemon cannot start on servo-host.
+ SERVOD_ISSUE = 9;
+ // device lid is not open.
+ LID_OPEN_FAILED = 10;
+ // the ribbon cable between servo and DUT is broken or not connected.
+ BAD_RIBBON_CABLE = 11;
+ // the EC on the DUT has issue.
+ EC_BROKEN = 12;
}
// Next Tag: 4