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}
30
31// Internal configuration
32// TODO(fdeng): Currently we specify resolutions and orientations
33// for all device types in the same config. And all branches are
34// using the same config at data/default.config. However,
35// each branch only supports a subset of devices. So ideally,
36// we should have one config per branch, and only specify supported
37// devices for that branch in the config.
38message InternalConfig {
39  optional DefaultUserConfig default_usr_cfg = 1;
40  // Device resolution
41  map <string, string>  device_resolution_map = 2;
42  // Device default orientation
43  map <string, string>  device_default_orientation_map = 3;
44  // Minimum gce instance size, e.g. n1-standard-1
45  optional string min_machine_size = 4;
46  // The name of the default disk image, e.g. avd-system.tar.gz
47  optional string disk_image_name = 5;
48  // The mime type of the disk image, e.g. 'application/x-tar'
49  optional string disk_image_mime_type = 6;
50  // The file extension of disk image, e.g. ".tar.gz"
51  optional string disk_image_extension = 7;
52  // The name of the raw image name that should apper in the tar gz file.
53  // e.g. "disk.raw"
54  optional string disk_raw_image_name = 8;
55  // The file extension of a raw linux image file, e.g. "img"
56  // If file is of this type, it will be compressed to avd-system.tar.gz
57  optional string disk_raw_image_extension = 9;
58  // Default data disk device to use when extra_data_disk_size_gb
59  // is greater than 0
60  optional string default_extra_data_disk_device = 10;
61  // A map from size_gb to the name of a precreated_data_image
62  map <int32, string> precreated_data_image = 11;
63  // Branches and corresponding mininum build_ids for which
64  // this config is valid for.
65  map <string, int32>  valid_branch_and_min_build_id = 12;
66
67  // Path of a file where Oauth2 credential data will be cached.
68  // For example, ".acloud_oauth2.dat". This file will be created under
69  // the home directory if the user is authenticated via Oauth2 method.
70  // The file name by convention usually starts with a dot noting it is
71  // a hidden file.
72  optional string creds_cache_file = 13;
73  // user_agent is a string noting which software it is.
74  // It is used during the Oauth2 authentication flow. It is okay to
75  // make up a value, e.g. "acloud".
76  optional string user_agent = 14;
77  // Error messages to be displayed to user when the user
78  // does not have access to the cloud project.
79  // Key is the name of the project.
80  // Value is the error message to show.
81  map <string, string> no_project_access_msg_map = 15;
82}
83