• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  // [CVD only] Version of fetch_cvd to use.
46  optional string fetch_cvd_version = 12;
47}
48
49// Internal configuration
50// TODO: Currently we specify resolutions and orientations
51// for all device types in the same config. And all branches are
52// using the same config at data/default.config. However,
53// each branch only supports a subset of devices. So ideally,
54// we should have one config per branch, and only specify supported
55// devices for that branch in the config.
56message InternalConfig {
57  optional DefaultUserConfig default_usr_cfg = 1;
58  // Device resolution
59  map <string, string>  device_resolution_map = 2;
60  // Device default orientation
61  map <string, string>  device_default_orientation_map = 3;
62  // Minimum gce instance size, e.g. n1-standard-1
63  optional string min_machine_size = 4;
64  // The name of the default disk image, e.g. avd-system.tar.gz
65  optional string disk_image_name = 5;
66  // The mime type of the disk image, e.g. 'application/x-tar'
67  optional string disk_image_mime_type = 6;
68  // The file extension of disk image, e.g. ".tar.gz"
69  optional string disk_image_extension = 7;
70  // The name of the raw image name that should apper in the tar gz file.
71  // e.g. "disk.raw"
72  optional string disk_raw_image_name = 8;
73  // The file extension of a raw linux image file, e.g. "img"
74  // If file is of this type, it will be compressed to avd-system.tar.gz
75  optional string disk_raw_image_extension = 9;
76  // Default data disk device to use when extra_data_disk_size_gb
77  // is greater than 0
78  optional string default_extra_data_disk_device = 10;
79  // A map from size_gb to the name of a precreated_data_image
80  map <int32, string> precreated_data_image = 11;
81  // Branches and corresponding mininum build_ids for which
82  // this config is valid for.
83  map <string, int32>  valid_branch_and_min_build_id = 12;
84
85  // Path of a file where Oauth2 credential data will be cached.
86  // For example, ".acloud_oauth2.dat". This file will be created under
87  // the home directory if the user is authenticated via Oauth2 method.
88  // The file name by convention usually starts with a dot noting it is
89  // a hidden file.
90  optional string creds_cache_file = 13;
91  // user_agent is a string noting which software it is.
92  // It is used during the Oauth2 authentication flow. It is okay to
93  // make up a value, e.g. "acloud".
94  optional string user_agent = 14;
95
96  // Error messages to be displayed to user when the user
97  // does not have access to the cloud project.
98  // Key is the name of the project.
99  // Value is the error message to show.
100  map <string, string> no_project_access_msg_map = 15;
101
102  // [CVD only] The kernel build target: "kernel". This is unlikely to change.
103  optional string kernel_build_target = 16;
104
105  // [GOLDFISH only] The emulator build target: "sdk_tools_linux".
106  // It's very unlikely that this will ever change.
107  optional string emulator_build_target = 17;
108
109  // Common hw property
110  map <string, string>  common_hw_property_map = 18;
111}
112