aboutsummaryrefslogtreecommitdiff
path: root/internal/proto/internal_config.proto
blob: a9d539b59ffbb3cac305b9c6d9f494ad63d03c1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Copyright 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

package acloud.internal.proto;

// Default values to use when user did not provide a value.
// Each field should match a field in user_config.UserConfig.
message DefaultUserConfig {
  optional string machine_type = 1;
  optional string network = 2;
  // Default extra data disk size.
  optional int32 extra_data_disk_size_gb = 3;
  // Metadata for creating Compute Engine instance
  // The map will be updated with values from user config.
  map <string, string>  metadata_variable = 4;
  // [CVD only] The name of the stable host image
  optional string stable_host_image_name = 5;
  // [CVD only] The project where stable host image is
  optional string stable_host_image_project = 6;
  // [GOLDFISH only] The name of the stable host image
  optional string stable_goldfish_host_image_name = 7;
  // [GOLDFISH only] The project where stable host image is
  optional string stable_goldfish_host_image_project = 8;
  // [CHEEPS only] The name of the stable host image
  optional string stable_cheeps_host_image_name = 9;
  // [CHEEPS only] The project where stable host image is
  optional string stable_cheeps_host_image_project = 10;
}

// Internal configuration
// TODO: Currently we specify resolutions and orientations
// for all device types in the same config. And all branches are
// using the same config at data/default.config. However,
// each branch only supports a subset of devices. So ideally,
// we should have one config per branch, and only specify supported
// devices for that branch in the config.
message InternalConfig {
  optional DefaultUserConfig default_usr_cfg = 1;
  // Device resolution
  map <string, string>  device_resolution_map = 2;
  // Device default orientation
  map <string, string>  device_default_orientation_map = 3;
  // Minimum gce instance size, e.g. n1-standard-1
  optional string min_machine_size = 4;
  // The name of the default disk image, e.g. avd-system.tar.gz
  optional string disk_image_name = 5;
  // The mime type of the disk image, e.g. 'application/x-tar'
  optional string disk_image_mime_type = 6;
  // The file extension of disk image, e.g. ".tar.gz"
  optional string disk_image_extension = 7;
  // The name of the raw image name that should apper in the tar gz file.
  // e.g. "disk.raw"
  optional string disk_raw_image_name = 8;
  // The file extension of a raw linux image file, e.g. "img"
  // If file is of this type, it will be compressed to avd-system.tar.gz
  optional string disk_raw_image_extension = 9;
  // Default data disk device to use when extra_data_disk_size_gb
  // is greater than 0
  optional string default_extra_data_disk_device = 10;
  // A map from size_gb to the name of a precreated_data_image
  map <int32, string> precreated_data_image = 11;
  // Branches and corresponding mininum build_ids for which
  // this config is valid for.
  map <string, int32>  valid_branch_and_min_build_id = 12;

  // Path of a file where Oauth2 credential data will be cached.
  // For example, ".acloud_oauth2.dat". This file will be created under
  // the home directory if the user is authenticated via Oauth2 method.
  // The file name by convention usually starts with a dot noting it is
  // a hidden file.
  optional string creds_cache_file = 13;
  // user_agent is a string noting which software it is.
  // It is used during the Oauth2 authentication flow. It is okay to
  // make up a value, e.g. "acloud".
  optional string user_agent = 14;

  // Error messages to be displayed to user when the user
  // does not have access to the cloud project.
  // Key is the name of the project.
  // Value is the error message to show.
  map <string, string> no_project_access_msg_map = 15;

  // [CVD only] The kernel build target: "kernel". This is unlikely to change.
  optional string kernel_build_target = 16;

  // [GOLDFISH only] The emulator build target: "sdk_tools_linux".
  // It's very unlikely that this will ever change.
  optional string emulator_build_target = 17;

  // Common hw property
  map <string, string>  common_hw_property_map = 18;
}