• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto3";
6
7package chromiumos.test.lab.api;
8
9option go_package = "go.chromium.org/chromiumos/config/go/test/lab/api";
10
11import "google/protobuf/timestamp.proto";
12
13// BluetoothPeerChameleondConfig is the format of the btpeer chameleond config
14// JSON file stored in GCS that contains configuration information which maps
15// different chameleond bundles to use for btpeers to DUT release versions.
16//
17// All available chameleond bundles are specified in bundles. The "next" bundle
18// is only used by a smaller set of hosts whose test results are monitored to
19// check whether or not this next bundle is good to release to all other
20// testbeds. The next bundle is identified by the next_chameleond_commit, which
21// will match its chameleond_commit.
22//
23// When the primary DUT's hostname is in next_dut_hosts AND its release version
24// is in next_dut_release_versions, the next bundle should be used if
25// next_chameleond_commit is set. Otherwise, the bundle with the the highest
26// min_dut_release_version that is less than or equal to the testbed's primary
27// DUT's release version (excluding the next bundle) should be used. If all
28// bundles have a higher min_dut_release_version than the primary DUT, the
29// bundle with the lowest min_dut_release_version (excluding the next bundle)
30// should be used.
31//
32// For example, let's say we have the following config:
33// {
34//   "nextChameleondCommit": "8e331c7",
35//   "nextDutHosts": [
36//     "chromeos15-row8-metro4-host5",
37//     "chromeos15-row8-metro4-host6",
38//     "chromeos15-row5-rack7-host7",
39//     "chromeos15-row5-rack8-host7",
40//     "chromeos15-row5-rack1-host4",
41//     "chromeos15-row5-rack2-host4"
42//   ],
43//   "nextDutReleaseVersions": [
44//     "14051.0.0"
45//   ],
46//   "bundles": [
47//     {
48//       "chameleondCommit": "723e87b",
49//       "archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-723e87b.tar.gz",
50//       "minDutReleaseVersion": "0"
51//     },
52//     {
53//       "chameleondCommit": "cf50534",
54//       "archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-cf50534.tar.gz",
55//       "minDutReleaseVersion": "1234.5.6"
56//     },
57//     {
58//       "chameleondCommit": "8e331c7",
59//       "archivePath": "gs://chromeos-connectivity-test-artifacts/btpeer/chameleond/chameleond-0.0.2-8e331c7.tar.gz",
60//       "minDutReleaseVersion": "14051.0.0"
61//     }
62//   ]
63// }
64//
65// The following are examples of chameleond commits to use for each host and
66// release version combinations:
67//  - "chromeos15-row8-metro4-host5","14051.0.0" => "8e331c7" (next)
68//  - "chromeos15-row1-rack2-host4","14051.0.0" => "cf50534"
69//  - "chromeos15-row8-metro4-host5","1500.0.0" => "cf50534"
70//  - "chromeos15-row1-rack2-host4","1000.0.0" => "723e87b"
71message BluetoothPeerChameleondConfig {
72  message ChameleondBundle {
73    // The commit of the chameleond repo that this bundle was created at.
74    string chameleond_commit = 1;
75
76    // The path to the bundle archive file in GCS.
77    string archive_path = 2;
78
79    // The minimum DUT CHROMEOS_RELEASE_VERSION this bundle should be used with.
80    string min_dut_release_version = 3;
81  }
82
83  // The chameleond commit is used to identify the "next" bundle in bundles.
84  // An empty value means there is no next bundle currently under evaluation and
85  // the standard chameleon bundle selection method should be used to determine
86  // which bundle to use.
87  string next_chameleond_commit = 1;
88
89  // Hostnames of primary testbed DUTs that, if matched along with
90  // next_dut_release_versions, signify that the next bundle should be used.
91  repeated string next_dut_hosts = 2;
92
93  // ChromeOS release versions of primary testbed DUTs that, if matched along
94  // with next_dut_hosts, signify that the next bundle should be used.
95  repeated string next_dut_release_versions = 3;
96
97  // The released bundles to available for btpeers.
98  repeated ChameleondBundle bundles = 4;
99}
100
101// RaspiosCrosBtpeerImageConfig defines which custom ChromeOS Raspios image
102// should be used for a given Raspberry Pi btpeer and DUT.
103message RaspiosCrosBtpeerImageConfig {
104  // OSImage describes a released OS image available for download.
105  // Must contain images with uuids that match current_image_uuid and non-empty
106  // next_image_uuid values.
107  message OSImage {
108    // The unique ID of the image.
109    string uuid = 1;
110
111    // The path to the image file. Should be a full GCS path.
112    //
113    // Image file extension should describe the compression format used:
114    //  *.img = no compression
115    //  *.img.gz = gz compression
116    //  *.img.xz = xz compression
117    string path = 2;
118  }
119
120  // The image that should be used for btpeers in testbeds whose primary DUT
121  // is not in the next_image_verification_dut_pool. Must not be empty.
122  string current_image_uuid = 1;
123
124  // The image that should be used for btpeers in testbeds whose primary DUT
125  // is in the next_image_verification_dut_pool. If empty, current_image_uuid
126  // should be used instead.
127  string next_image_uuid = 2;
128
129  // Btpeers that are in testbeds with these primary DUT hostnames should
130  // use the next_image_uuid instead of the current_image_uuid for image
131  // selection.
132  repeated string next_image_verification_dut_pool = 3;
133
134  // All available OS image releases.
135  repeated OSImage images = 4;
136}
137
138// RaspiosCrosBtpeerImageBuildInfo is the format of the image build info JSON
139// file present on ChromeOS Raspios images built with pi-gen-btpeer for btpeers.
140message RaspiosCrosBtpeerImageBuildInfo {
141  // A unique identifier of the image, generated at build time.
142  string image_uuid = 1;
143
144  // The time the image was built.
145  google.protobuf.Timestamp image_build_time = 2;
146
147  // A mapping of repository URLs to git commit hashes for each source
148  // repository used during the image building process which are relevant to
149  // ChromeOS customizations (e.g pi-gen-btpeer, chameleon, btpeerd).
150  map<string, string> sources = 3;
151}
152