1// Copyright 2016 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto2"; 16 17package acloud.internal.proto; 18 19// Default values to use when user did not provide a value. 20// Each field should match a field in user_config.UserConfig. 21message DefaultUserConfig { 22 optional string machine_type = 1; 23 optional string network = 2; 24 // Default extra data disk size. 25 optional int32 extra_data_disk_size_gb = 3; 26 // Metadata for creating Compute Engine instance 27 // The map will be updated with values from user config. 28 map <string, string> metadata_variable = 4; 29 // [CVD only] The name of the stable host image 30 optional string stable_host_image_name = 5; 31 // [CVD only] The project where stable host image is 32 optional string stable_host_image_project = 6; 33 // [GOLDFISH only] The name of the stable host image 34 optional string stable_goldfish_host_image_name = 7; 35 // [GOLDFISH only] The project where stable host image is 36 optional string stable_goldfish_host_image_project = 8; 37 // [CHEEPS only] The name of the stable host image 38 optional string stable_cheeps_host_image_name = 9; 39 // [CHEEPS only] The project where stable host image is 40 optional string stable_cheeps_host_image_project = 10; 41 // The pattern of the instance name, e.g. ins-{uuid}-{build_id}-{build_target} 42 // the parts in {} will be automatically replaced with the actual value if 43 // you specify them in the pattern, uuid will be automatically generated. 44 optional string instance_name_pattern = 11; 45} 46 47// Internal configuration 48// TODO: Currently we specify resolutions and orientations 49// for all device types in the same config. And all branches are 50// using the same config at data/default.config. However, 51// each branch only supports a subset of devices. So ideally, 52// we should have one config per branch, and only specify supported 53// devices for that branch in the config. 54message InternalConfig { 55 optional DefaultUserConfig default_usr_cfg = 1; 56 // Device resolution 57 map <string, string> device_resolution_map = 2; 58 // Device default orientation 59 map <string, string> device_default_orientation_map = 3; 60 // Minimum gce instance size, e.g. n1-standard-1 61 optional string min_machine_size = 4; 62 // The name of the default disk image, e.g. avd-system.tar.gz 63 optional string disk_image_name = 5; 64 // The mime type of the disk image, e.g. 'application/x-tar' 65 optional string disk_image_mime_type = 6; 66 // The file extension of disk image, e.g. ".tar.gz" 67 optional string disk_image_extension = 7; 68 // The name of the raw image name that should apper in the tar gz file. 69 // e.g. "disk.raw" 70 optional string disk_raw_image_name = 8; 71 // The file extension of a raw linux image file, e.g. "img" 72 // If file is of this type, it will be compressed to avd-system.tar.gz 73 optional string disk_raw_image_extension = 9; 74 // Default data disk device to use when extra_data_disk_size_gb 75 // is greater than 0 76 optional string default_extra_data_disk_device = 10; 77 // A map from size_gb to the name of a precreated_data_image 78 map <int32, string> precreated_data_image = 11; 79 // Branches and corresponding mininum build_ids for which 80 // this config is valid for. 81 map <string, int32> valid_branch_and_min_build_id = 12; 82 83 // Path of a file where Oauth2 credential data will be cached. 84 // For example, ".acloud_oauth2.dat". This file will be created under 85 // the home directory if the user is authenticated via Oauth2 method. 86 // The file name by convention usually starts with a dot noting it is 87 // a hidden file. 88 optional string creds_cache_file = 13; 89 // user_agent is a string noting which software it is. 90 // It is used during the Oauth2 authentication flow. It is okay to 91 // make up a value, e.g. "acloud". 92 optional string user_agent = 14; 93 94 // Error messages to be displayed to user when the user 95 // does not have access to the cloud project. 96 // Key is the name of the project. 97 // Value is the error message to show. 98 map <string, string> no_project_access_msg_map = 15; 99 100 // [CVD only] The kernel build target: "kernel". This is unlikely to change. 101 optional string kernel_build_target = 16; 102 103 // [GOLDFISH only] The emulator build target: "sdk_tools_linux". 104 // It's very unlikely that this will ever change. 105 optional string emulator_build_target = 17; 106 107 // Common hw property 108 map <string, string> common_hw_property_map = 18; 109} 110