• 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.build.api;
8
9option go_package = "go.chromium.org/chromiumos/config/go/build/api";
10
11import "chromiumos/config/api/device_config.proto";
12import "chromiumos/config/api/device_config_id.proto";
13
14// Retrieves build-specific metadata, which can be used during
15// test execution.
16// E.g. Hardware/feature details for a given device, test configs,
17// and software settings.
18service MetadataService {
19  // Retrieves all of the known device hardware configuration
20  // based on a unique id or hardware/manufacturing identifiers
21  // scanned off of a live device.
22  rpc GetDeviceConfig(GetDeviceConfigRequest)
23      returns (GetDeviceConfigResponse);
24}
25
26message GetDeviceConfigRequest {
27  oneof id_type {
28    // If the ID has already been captured/stored (in inventory system).
29    chromiumos.config.api.DeviceConfigId id = 1;
30    // If the ID is scanned off a live device via dut_service.proto
31    chromiumos.config.api.DeviceConfigId.ScanConfig scan_config = 2;
32  }
33}
34
35message GetDeviceConfigResponse {
36  message Success {
37    chromiumos.config.api.DeviceConfig device_config = 1;
38  }
39  message Failure {
40    // Human readable error to aid in debugging
41    string error_message = 1;
42  }
43
44  oneof result {
45    Success success = 1;
46    Failure failure = 2;
47  }
48}
49