api/controller: Add require_each validation.
The new require_each validator allows validation we were previously
unable to do automatically. Add usages in appropriate locations.
BUG=None
TEST=./run_pytest
Change-Id: I7efefc95ec1f1f500c41f31ab2797e33ce5eab01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2426960
Commit-Queue: Alex Klein <saklein@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Michael Mortensen <mmortensen@google.com>
diff --git a/api/controller/sdk.py b/api/controller/sdk.py
index 89e26cb..1e8adfc 100644
--- a/api/controller/sdk.py
+++ b/api/controller/sdk.py
@@ -64,6 +64,7 @@
@faux.success(_ChrootVersionResponse)
@faux.empty_error
+@validate.require_each('toolchain_targets', ['name'])
@validate.validation_complete
def Update(input_proto, output_proto, _config):
"""Update the chroot.