Documentation
¶
Overview ¶
Package device implements utilities to extract device information.
Index ¶
- func Address(device *api.CrosTestRequest_Device) (string, error)
- func AppendChromeOsLabels(dut *DutInfo) (map[string]string, []string, error)
- func DerviceSerials(req *api.CrosTestRequest) ([]string, error)
- func GenLabConfig(primary *DutInfo, companions []*DutInfo, androidCompanion []*AndroidInfo) (*protocol.DUTLabConfig, error)
- type AndroidInfo
- type DutInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Address ¶
func Address(device *api.CrosTestRequest_Device) (string, error)
Address returns the address of a DUT. TODO: Remove this after no test drivers are using this.
func AppendChromeOsLabels ¶
AppendChromeOsLabels appends labels extracted from ChromeOS device.
func DerviceSerials ¶
func DerviceSerials(req *api.CrosTestRequest) ([]string, error)
DerviceSerials extracts serial information of all devices from a requests test.
func GenLabConfig ¶
func GenLabConfig(primary *DutInfo, companions []*DutInfo, androidCompanion []*AndroidInfo) (*protocol.DUTLabConfig, error)
GenLabConfig gemerates DUT lab config proto.
Types ¶
type AndroidInfo ¶
type AndroidInfo struct { AssoicateAddr string // A hostname of the device that the Android DUT is attached to. Serial string // A string created by adb to uniquely identify the device. ModelName string // The model name of the device. DUT *labapi.Dut // The DUT topology. }
AndroidInfo stores information of a Android device.
func FillAndroidInfo ¶
func FillAndroidInfo(device *api.CrosTestRequest_Device) *AndroidInfo
FillAndroidInfo extracts Android information from a device.
type DutInfo ¶
type DutInfo struct { Addr string // The address of the DUT. Role string // The role of the DUT. Servo string // The address of the servo. DutServer string // The address of the dutServer. LibsServer string // The address of the libsServer. ProvisionServer string // The address of the provision server DevboardServer string // The address of the devboard server. Board string // The board of the DUT Model string // The model of the DUT ServoHostname string // The hostname of the Servo paired with the DUT ServoPort string // The port of the Servo paired with the DUT ServoSerial string // The serial of the Servo paired with the DUT ChameleonAudio bool // If the DUT has a ChameleonAudio peripheral ChamelonPresent bool // If the DUT has a Chameleon peripheral ChamelonPeriphsList []string // The list of Chameleon peripherals AtrusAudio bool // If the DUT has a AtrusAudio label TouchMimo bool // If the DUT has a TouchMimo label CameraboxFacing string // The direction the camerabox is facing, ie "front" or "back" CableList []string // The list of cables attached CarrierList []string // the list of carriers HwIDList []string // HwIDlist Sku string Phase string BTPeers int CacheServer string HWID string FrontendAddress string PowerUnitHostName string PowerUnitOutlet string HydraHostName string SimInfos []string WifiSecretSsid string WifiSecretSecurity string WifiSecretPassword string DUT *labapi.Dut IP string }
DutInfo stores information of a ChromeOS DUT.
func FillDUTInfo ¶
func FillDUTInfo(device *api.CrosTestRequest_Device, role string) (*DutInfo, error)
FillDUTInfo extracts DUT information from a device.
Click to show internal directories.
Click to hide internal directories.