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/test/lab/api/dut.proto"; 12 13// Provides access to all of the lab device device wiring/setup information. 14// 15// Implementations of this service will vary on a lab-environment basis. 16// E.g. Local lab, Mobile lab, Managed lab, Partner lab 17// 18// This allows dependent services (e.g. test execution, device provisioning) to 19// run consistently based on this stable API, agnostic of the lab environment. 20service InventoryService { 21 // Returns the device wiring topology, including all peripherals attached to 22 // the device and peer devices that are used in the test setup. 23 rpc GetDutTopology(GetDutTopologyRequest) 24 returns (stream GetDutTopologyResponse); 25} 26 27message GetDutTopologyRequest { 28 // Unique ID of the DUT topology 29 // Provided by the client (e.g. local test environment) or by 30 // the automated scheduling layer (e.g. test setup that was assigned to 31 // service the requested testing). 32 DutTopology.Id id = 1; 33} 34 35message GetDutTopologyResponse { 36 message Success { 37 DutTopology dut_topology = 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