api: Plumb Chroot.out_path into router/controller
We're not yet using this for anything, but let's get the API mechanics
in place.
BUG=b:265885353
TEST=./run_tests
Change-Id: Ieec3f8c4f74af99b3a043997c3fb9bad703fb7e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4327886
Commit-Queue: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/api/field_handler.py b/api/field_handler.py
index 1159fcc..effed5a 100644
--- a/api/field_handler.py
+++ b/api/field_handler.py
@@ -85,13 +85,15 @@
return handler.parse_chroot(common_pb2.Chroot())
-def handle_goma(message, chroot_path):
+def handle_goma(message, chroot_path, out_path):
"""Find and parse the GomaConfig field, returning the Goma instance."""
for descriptor in message.DESCRIPTOR.fields:
field = getattr(message, descriptor.name)
if isinstance(field, common_pb2.GomaConfig):
goma_config = field
- return controller_util.ParseGomaConfig(goma_config, chroot_path)
+ return controller_util.ParseGomaConfig(
+ goma_config, chroot_path, out_path
+ )
return None