1/* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto3"; 18 19package cuttlefish.test_gce_driver; 20 21option java_multiple_files = true; 22option java_package = "com.android.cuttlefish.test"; 23option java_outer_classname = "TestGceDriverProtos"; 24 25message TestMessage { 26 oneof contents { 27 Exit exit = 1; 28 StreamEnd stream_end = 2; 29 Error error = 3; 30 CreateInstance create_instance = 4; 31 SshCommand ssh_command = 5; 32 Data data = 6; 33 UploadBuildArtifact upload_build_artifact = 7; 34 UploadFile upload_file = 8; 35 } 36} 37 38message Exit {} 39 40message StreamEnd {} 41 42message Error { 43 string text = 1; 44} 45 46message GceInstanceId { 47 string name = 1; 48 string zone = 2; 49} 50 51message CreateInstance { 52 GceInstanceId id = 1; 53} 54 55message SshCommand { 56 GceInstanceId instance = 1; 57 repeated string arguments = 2; 58} 59 60enum DataType { 61 DATA_TYPE_UNSPECIFIED = 0; 62 DATA_TYPE_STDOUT = 1; 63 DATA_TYPE_STDERR = 2; 64 DATA_TYPE_RETURN_CODE = 3; 65 DATA_TYPE_FILE_CONTENTS = 4; 66} 67 68message Data { 69 DataType type = 1; 70 bytes contents = 2; 71} 72 73message Build { 74 string id = 1; 75 string target = 2; 76} 77 78message UploadBuildArtifact { 79 GceInstanceId instance = 1; 80 Build build = 2; 81 string artifact_name = 3; 82 string remote_path = 4; 83} 84 85message UploadFile { 86 GceInstanceId instance = 1; 87 string remote_path = 2; 88} 89