• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto3";
6
7package chromiumos.test.lab.api;
8
9option go_package = "go.chromium.org/chromiumos/config/go/test/lab/api";
10
11import "chromiumos/config/api/device_config_id.proto";
12import "chromiumos/test/lab/api/ip_endpoint.proto";
13import "chromiumos/test/lab/api/pasit_host.proto";
14import "chromiumos/test/lab/api/wifi_router.proto";
15
16// Specification of Device Under Test.
17// Next Tag: 7
18message Dut {
19  // Unique identifier for the lab device. It can be the DUT serial number
20  // (e.g. "C144091") derived from the DUT itself or some other unique value
21  // regarding different contexts.
22  message Id {
23    string value = 1;
24  }
25
26  Id id = 1;
27
28  oneof dut_type {
29    ChromeOS chromeos = 2;
30    Android android = 3;
31    Devboard devboard = 5;
32  }
33
34  // Chrome OS specific DUT details
35  // Populated by and should be kept in sync with UFS adapter in:
36  // https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/cros/cmd/labservice/internal/ufs/ufs.go
37  // NEXT TAG: 24
38  message ChromeOS {
39    // Unique identifiers around the device's hardware, manufacturing, and brand
40    // configuration.
41    chromiumos.config.api.DeviceConfigId device_config_id = 3;
42    // Endpoint for ssh service running on the device
43    IpEndpoint ssh = 2;
44
45    // ChromeOS DUT name that is usually associated with the hostname.
46    // Example: "chromeos6-row16-rack11-host1"
47    string name = 15;
48
49    DutModel dut_model = 14;
50    Servo servo = 4;
51    Chameleon chameleon = 5;
52    RPM rpm = 6;
53    repeated ExternalCamera external_cameras = 7;
54    Audio audio = 8;
55    Wifi wifi = 9;
56    Touch touch = 10;
57    Camerabox camerabox = 11;
58    repeated Cable cables = 12;
59    Cellular cellular = 13;
60    repeated string hwid_component = 16;
61    repeated BluetoothPeer bluetooth_peers = 17;
62    string sku = 18;
63    string hwid = 19;
64    Phase phase = 20;
65    repeated SIMInfo sim_infos = 21;
66    ModemInfo modem_info = 22;
67    // The host and topology used in peripheral interop test beds.
68    PasitHost pasit_host = 23;
69
70    reserved 1;
71  }
72
73  // Android specific DUT details
74  message Android {
75    // A hostname of the device that the Android DUT is attached to.
76    IpEndpoint associated_hostname = 1;
77    // Android DUT name.
78    string name = 2;
79    // A string created by adb to uniquely identify the device.
80    string serial_number = 3;
81    DutModel dut_model = 4;
82  }
83
84  // Devboard specific DUT details
85  message Devboard {
86    // The type of devboard, e.g., andreiboard.
87    string board_type = 1;
88    // Serial for the UltraDebug interface, if present.
89    string ultradebug_serial = 2;
90    Servo servo = 3;
91    // An ID string for the fingerprint module.
92    string fingerprint_module_id = 4;
93    // Devboard DUT name.
94    string name = 5;
95    DutModel dut_model = 6;
96  }
97
98  // Cache server for downloading artifacts related to this DUT.
99  CacheServer cache_server = 4;
100
101  // The secret for wifi tests.
102  WifiSecret wifi_secret =  6;
103}
104
105// Defines the build target/board and model of the Dut
106message DutModel {
107  string build_target = 1;
108  string model_name = 2;
109}
110
111// Defines the topology of connected devices under test
112message DutTopology {
113  // Unique identifier for a given dut topology (schedulable lab unit)
114  message Id {
115    string value = 1;
116  }
117  Id id = 3;
118
119  // Collection of devices that are used in a given test.
120  // Generally, this will contain a single Dut for an functional test that
121  // doesn't depend on other devices, but can include a collection of devices
122  // used in multi-dut testing (e.g. ChromeOS to ChromeOS, ChromeOS to Android,
123  // etc...)
124  repeated Dut duts = 4;
125
126  reserved 1, 2;
127}
128
129// Peripherals related to audio input and output from the Device.
130message Audio {
131  // Device is housed in an audio box to record / replay audio
132  // for audio testing.
133  bool audio_box = 1;
134  // Device is connected to Atrus speakermic.
135  bool atrus = 2;
136}
137
138// A cable connecting the device to audio, printer and other peripherals.
139message Cable {
140  enum Type {
141    TYPE_UNSPECIFIED = 0;
142    AUDIOJACK = 1;
143    USBAUDIO = 2;
144    USBPRINTING = 3;
145    HDMIAUDIO = 4;
146  }
147  Type type = 1;
148}
149
150// A cache server for downloading artifacts.
151//
152// The server should support the following HTTP requests:
153//
154// GET /download/GS_BUCKET/GS_PATH
155// Download a file from Google Storage.
156//
157// GET /extract/GS_BUCKET/GS_PATH?file=TAR_PATH
158// Download a file within a (possibly compressed) TAR archive stored
159// in Google Storage.
160//
161// GET /decompress/GS_BUCKET/GS_PATH
162// Download the decompressed data of a compressed file from Google Storage.
163message CacheServer {
164  // HTTP address for the cache server.
165  IpEndpoint address = 1;
166}
167
168// A steady and controllable camera box environment for the device, used by
169// camera test automation. http://go/cros-camera-box
170message Camerabox {
171  // Facing of DUT's camera to be tested whose FOV should cover chart tablet's
172  // screen.
173  enum Facing {
174    FACING_UNSPECIFIED = 0;
175    // DUT's back camera faces the chart tablet.
176    BACK = 1;
177    // DUT's front camera faces to chart tablet.
178    FRONT = 2;
179  }
180  Facing facing = 1;
181}
182
183message Cellular {
184  enum Operator {
185    OPERATOR_UNSPECIFIED = 0;
186    ATT = 1;
187    VERIZON = 2;
188    TMOBILE = 3;
189  }
190  // Cellular operators supported by the SIM installed in the device.
191  // Note this is not used as it has been superseded by SimInfo.
192  repeated Operator operators = 1;
193
194  // Carrier is the DUTs carrier name/type from:
195  // https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/unifiedfleet/api/v1/models/chromeos/lab/peripherals.proto;l=31
196  string carrier = 2;
197}
198
199// ModemInfo is adapted from ufs and should be kept in sync with:
200// https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/unifiedfleet/api/v1/models/chromeos/lab/modeminfo.proto
201// Next Tag: 6
202message ModemInfo {
203  ModemType type = 1;
204  string imei = 2;
205  string supported_bands = 3;
206  int32 sim_count = 4;
207  string model_variant = 5;
208}
209
210// Next Tag: 12
211enum ModemType {
212  MODEM_TYPE_UNSPECIFIED = 0;
213  MODEM_TYPE_UNSUPPORTED = 8;
214  MODEM_TYPE_QUALCOMM_SC7180 = 1;
215  MODEM_TYPE_FIBOCOMM_L850GL = 2;
216  MODEM_TYPE_NL668 = 3;
217  MODEM_TYPE_FM350 = 4;
218  MODEM_TYPE_FM101 = 5;
219  MODEM_TYPE_QUALCOMM_SC7280 = 6;
220  MODEM_TYPE_EM060 = 7;
221  MODEM_TYPE_RW101 = 9;
222  MODEM_TYPE_RW135 = 10;
223  MODEM_TYPE_LCUK54 = 11;
224}
225
226message SIMInfo {
227  int32 slot_id = 1;
228  SIMType type = 2;
229  string eid = 3;
230  bool test_esim = 4;
231  repeated SIMProfileInfo profile_info = 5;
232}
233
234message SIMProfileInfo {
235  string iccid = 1;
236  string sim_pin = 2;
237  string sim_puk = 3;
238  NetworkProvider carrier_name = 4;
239  string own_number = 5;
240  // The SIM state as reported by the cellular modem.
241  State state = 6;
242
243  // Possible states of the SIM profile.
244  enum State {
245    // State not set.
246    UNSPECIFIED = 0;
247    // The device is unusable.
248    BROKEN = 1;
249    // The device needs to be unlocked.
250    LOCKED = 2;
251    // No data connection available and not in a failed state.
252    NO_NETWORK = 3;
253    // The device is registered with a network provider, and data connections and messaging may be available for use.
254    WORKING = 4;
255    // The device has an invalid configuration in UFS.
256    WRONG_CONFIG = 5;
257  }
258
259  // Features supported by the profile.
260  // These features are used to determine what tests can be run against which SIMs
261  // in the lab, see go/cros-cellular-features for more information.
262  // File bugs against buganizer component: 979102.
263  repeated Feature features = 7;
264
265  // Possible features that the SIM supports.
266  enum Feature {
267    // Unset feature.
268    FEATURE_UNSPECIFIED = 0;
269    // The SIM supports a generic live network.
270    FEATURE_LIVE_NETWORK = 1;
271    // The SIM supports SMS messaging.
272    FEATURE_SMS = 2;
273  }
274}
275
276enum NetworkProvider {
277  NETWORK_OTHER = 0;
278  NETWORK_UNSUPPORTED = 5;
279  NETWORK_TEST = 1;
280  NETWORK_ATT = 2;
281  NETWORK_TMOBILE = 3;
282  NETWORK_VERIZON = 4;
283  NETWORK_SPRINT = 6;
284  NETWORK_DOCOMO = 7;
285  NETWORK_SOFTBANK = 8;
286  NETWORK_KDDI = 9;
287  NETWORK_RAKUTEN = 10;
288  NETWORK_VODAFONE = 11;
289  NETWORK_EE = 12;
290  NETWORK_AMARISOFT = 13;
291  NETWORK_ROGER = 14;
292  NETWORK_BELL = 15;
293  NETWORK_TELUS = 16;
294  NETWORK_FI = 17;
295  NETWORK_CBRS = 18;
296  NETWORK_LINEMO = 19;
297  NETWORK_POVO = 20;
298  NETWORK_HANSHIN = 21;
299}
300
301enum SIMType {
302  SIM_UNKNOWN = 0;
303  SIM_PHYSICAL = 1;
304  SIM_DIGITAL = 2;
305}
306
307// See https://sites.google.com/a/google.com/cros-chameleon/home
308message Chameleon {
309  enum Peripheral {
310    // TODO(b/268202522): remove obsolete chameleon types
311    PERIPHERAL_UNSPECIFIED = 0;
312    BT_HID = 1;
313    // Display Port
314    DP = 2;
315    DP_HDMI = 3;
316    VGA = 4;
317    // High Definition Multimedia Interface
318    HDMI = 5;
319    BT_BLE_HID = 6;
320    BT_A2DP_SINK = 7;
321    BT_PEER = 8;
322    // Raspberry Pi
323    RPI = 9;
324  }
325  repeated Peripheral peripherals = 1;
326  // Indicate if there's an audio_board in the chameleon.
327  bool audio_board = 2;
328  PeripheralState state = 3;
329  string hostname = 4;
330  enum Type {
331    TYPE_UNSPECIFIED = 0;
332    V2 = 1;
333    V3 = 2;
334  }
335  repeated Type types = 5;
336}
337
338// External camera connected to the device.
339message ExternalCamera {
340  enum Type {
341    TYPE_UNSPECIFIED = 0;
342    // camera Huddly GO
343    HUDDLY = 1;
344    // camera Logitech PTZ Pro 2
345    PTZPRO2 = 2;
346  }
347  Type type = 1;
348}
349
350// Next Tag: 3
351enum RPMType {
352  RPM_TYPE_UNKNOWN = 0;
353  RPM_TYPE_SENTRY = 1;
354  RPM_TYPE_IP9850 = 2;
355}
356
357// Remote power management capability for the device.
358message RPM {
359  bool present = 1;
360  // Address to the frontend service for accessing the RPM.
361  // The frontend service is an HTTP service that supports XMLRPC calls.
362  IpEndpoint frontend_address = 2;
363  // Hostname of a particular PDU that assigned to the DUT.
364  IpEndpoint power_unit_hostname = 3;
365  // Outlet name/number assigned to the DUT
366  string power_unit_outlet = 4;
367  // (Optional) Hydra hostname if the PDU access require a hydra.
368  IpEndpoint hydra_hostname = 5;
369  // RPM type
370  RPMType type = 6;
371}
372
373// Servo control of the device.
374message Servo {
375  bool present = 1;
376  // Address to the host running the servod daemon.
377  // Port number servod is listening on.
378  IpEndpoint servod_address = 2;
379  // Serial number of the servo.
380  string serial = 3;
381  // Current state of the servo, updated by latest auto-repair.
382  PeripheralState state = 4;
383}
384
385message Touch {
386  // Has touch monitor mimo.
387  bool mimo = 1;
388}
389
390// Wifi environment of the device.
391message Wifi {
392  enum Environment {
393    ENVIRONMENT_UNSPECIFIED = 0;
394    // Device is setup without any special wifi environment.
395    STANDARD = 1;
396    // Device is inside a hermetic wifi cell.
397    WIFI_CELL = 2;
398    // Device is setup in a chaos environment. It's a special settings for
399    // running wifi interop tests.
400    CHAOS = 3;
401    // In an environment where the AP is 802.11ax compliant.
402    // Context: crbug.com/1044786
403    ROUTER_802_11AX = 4;
404  }
405  Environment environment = 1;
406  WifiAntenna antenna = 2;
407
408  // WiFi APs assigned to the device.
409  repeated WifiRouter wifi_routers = 3;
410}
411
412message WifiAntenna {
413  // DUT's WiFi antenna's connection.
414  enum Connection {
415    CONNECTION_UNSPECIFIED = 0;
416    // WIFI antenna is connected conductively.
417    CONDUCTIVE = 1;
418    // WIFI antenna is connected over-the-air.
419    OTA = 2;
420  }
421  Connection connection = 1;
422}
423
424// WiFi APs attached to the DUT.
425// Note: Define here rather than in wifi_router.proto so we can reference RPM in
426// the future even though it's not used at the moment.
427//
428// Source of truth: https://source.chromium.org/chromium/infra/infra_superproject/+/main:infra/go/src/infra/unifiedfleet/api/v1/models/chromeos/lab/peripherals.proto
429message WifiRouter {
430  string hostname = 1;
431  PeripheralState state = 2;
432  // Model of the router (e.g. OPENWRT[Ubiquiti_UniFi_6_Lite], gale).
433  string model = 3;
434
435  // RPM to perform remote power management.
436  RPM rpm = 4;
437
438  // Supported test router hardware and software features.
439  repeated WifiRouterFeature supported_features = 5;
440
441  // The type of router device this is (e.g. OpenWrt-based, ChromeOS Gale).
442  WifiRouterDeviceType device_type = 6;
443}
444
445// Bluetooth Peers attached to the DUT.
446message BluetoothPeer {
447  string hostname = 1;
448  PeripheralState state = 2;
449}
450
451// Next Tag: 3
452enum PeripheralState {
453  PERIPHERAL_STATE_UNSPECIFIED = 0;
454  WORKING = 1;
455  BROKEN = 2;
456  NOT_APPLICABLE = 3;
457}
458
459// Next Tag: 34
460enum Phase {
461  PHASE_UNSPECIFIED = 0;
462  DVT = 1;
463  DVT_2 = 2;
464  DVT_2_MPS_LTE = 3;
465  DVT_BIPSHIP = 4;
466  DVT_BOOKEM = 5;
467  DVT_ELECTRO = 6;
468  DVT_LOCKE = 7;
469  DVT_OSCINO = 8;
470  DVT_REKS14 = 9;
471  DVT_REKS14_TOUCH = 10;
472  DVT_TOUCH = 11;
473  EVT = 12;
474  EVT_FLEEX_LTE = 13;
475  EVT_HQ = 14;
476  EVT_LTE = 15;
477  EVT_MAPLE = 16;
478  EVT_PUJJO = 17;
479  PROTO = 18;
480  PROTO1 = 19;
481  PVT = 20;
482  PVT_TERRA3 = 21;
483  PVT_US = 22;
484  PVT_2 = 23;
485  PVT_BOOKEM = 24;
486  PVT_ELECTRO = 25;
487  PVT_GIK360 = 26;
488  PVT_LILI = 27;
489  PVT_LTE = 28;
490  PVT_NEW_CPU = 29;
491  PVT_SAND = 30;
492  PVT_TUNE_BITS = 31;
493  PVT_TELESU = 32;
494  SR = 33;
495}
496
497// Next Tag: 4
498// WifiSecret is the secret used for wifi tests.
499message WifiSecret {
500  string ssid = 1; // wifi SSID
501  string security = 2; // security protocol, e.g. WEP, WPA, etc.
502  string password = 3; // wifi password
503}
504