Documentation
¶
Overview ¶
Package dutstate provides representation of states of DUT in Swarming and reading and updating a state in UFS service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidDUTStateStrings = []string{ string(Ready), string(NeedsReset), string(NeedsRepair), string(RepairFailed), string(NeedsDeploy), string(Deploying), string(Reserved), string(ManualRepair), string(NeedsManualRepair), string(NeedsReplacement), }
Functions ¶
func ConvertToUFSState ¶
ConvertToUFSState converts local state to the UFS representation.
Types ¶
type Info ¶
type Info struct { // Device identifier in inventory system. DeviceId string // State represents the state of the DUT from Swarming. State State // Time represents in Unix time of the last updated DUT state recorded. Time int64 // Time represents name of device type assosiated with host DeviceType string }
Info represent information of the state and last updated time.
type State ¶
type State string
State is an enum for host state.
const ( // Device ready to run tests. Ready State = "ready" // Provisioning failed on the device and required verified and repair. NeedsRepair State = "needs_repair" // Test failed on the device and required reset the state. NeedsReset State = "needs_reset" // Device did not recovered after running repair task on it. RepairFailed State = "repair_failed" // Device prepared to be deployed to the lab. NeedsDeploy State = "needs_deploy" // Device is under deployment Deploying State = "deploying" // Device reserved for analysis or hold by lab Reserved State = "reserved" // Device under manual repair interaction by lab ManualRepair State = "manual_repair" // Device required manual attention to be fixed NeedsManualRepair State = "needs_manual_repair" // Device is not fixable due issues with hardware and has to be replaced NeedsReplacement State = "needs_replacement" // Device state when state is not present or cannot be read from UFS. Unknown State = "unknown" )
All DUT states.
func ConvertFromUFSState ¶
ConvertFromUFSState converts UFS state to local representation.
type UFSClient ¶
type UFSClient interface { GetMachineLSE(ctx context.Context, req *ufsAPI.GetMachineLSERequest, opts ...grpc.CallOption) (*ufsProto.MachineLSE, error) UpdateMachineLSE(ctx context.Context, req *ufsAPI.UpdateMachineLSERequest, opts ...grpc.CallOption) (*ufsProto.MachineLSE, error) }
UFSClient represents short set of method of ufsAPI.FleetClient.
Click to show internal directories.
Click to hide internal directories.