| // Copyright 2019 The Chromium OS Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package rte; |
| |
| service RTE { |
| rpc Repair(RepairRequest) returns (RepairResponse); |
| rpc Provision(ProvisionRequest) returns (ProvisionResponse); |
| // Runs a shell command with the default shell. |
| // Does not spawn a tty. |
| rpc DutShell(DutShellRequest) returns (stream DutShellResponse); |
| |
| rpc GetDeviceConfig(GetDeviceConfigRequest) returns (GetDeviceConfigResponse); |
| rpc GetDeviceState(GetDeviceStateRequest) returns (GetDeviceStateResponse); |
| rpc SetDeviceState(SetDeviceStateRequest) returns (SetDeviceStateResponse); |
| |
| rpc AvailableServices(AvailableServicesRequest) returns (AvailableServicesResponse); |
| } |
| |
| message RepairRequest {} |
| message RepairResponse { |
| enum Status { |
| STATUS_UNKNOWN = 0; |
| STATUS_OK = 1; |
| STATUS_REPAIRED = 2; |
| STATUS_FAILED = 3; |
| } |
| Status status = 1; |
| string explanation = 2; |
| } |
| |
| message ProvisionRequest { |
| Image image = 1; |
| } |
| message ProvisionResponse { |
| enum Status { |
| STATUS_UNKNOWN = 0; |
| STATUS_OK = 1; |
| STATUS_FAIL_DUT_ALREADY_BAD = 2; |
| STATUS_FAIL_DOWNLOAD_IMAGE = 3; |
| STATUS_FAIL_TRANSFER_IMAGE = 4; |
| STATUS_FAIL_WRITE_PARTITIONS = 5; |
| STATUS_FAIL_DUT_GONE_AFTER_REBOOT = 6; |
| } |
| Status status = 1; |
| string explanation = 2; |
| } |
| |
| message Image {} |
| |
| message DutShellRequest { |
| string command = 1; |
| } |
| message DutShellResponse { |
| int32 status = 1; |
| // exited will be true for the last response in stream. |
| // status will be set. |
| // No more output follows. |
| bool exited = 2; |
| bytes output = 3; |
| } |
| |
| message GetDeviceConfigRequest {} |
| message GetDeviceConfigResponse {} |
| |
| message GetDeviceStateRequest {} |
| message GetDeviceStateResponse {} |
| |
| message SetDeviceStateRequest {} |
| message SetDeviceStateResponse {} |
| |
| message DeviceState { |
| Image installed_image = 1; |
| enum State { |
| STATE_NEEDS_REPAIR = 0; |
| } |
| State state = 2; |
| } |
| |
| message AvailableServicesRequest {} |
| message AvailableServicesResponse { |
| enum Service { |
| SERVICE_UNKNOWN = 0; |
| SERVICE_SERVO = 1; |
| SERVICE_RPM = 2; |
| SERVICE_CHAMELEON = 3; |
| } |
| repeated Service service = 1; |
| } |