aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/client-communication.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-20 16:23:28 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-20 16:23:28 +0000
commit021e6df8f69808740c531b963889217e22d1763e (patch)
tree8ac192f75d60adb2dff9b0a46ed43ba338cf6782 /guix-build-coordinator/client-communication.scm
parent2db1e3d9db54f599b07a2aa9cab8fa2e40d9255c (diff)
downloadbuild-coordinator-021e6df8f69808740c531b963889217e22d1763e.tar
build-coordinator-021e6df8f69808740c531b963889217e22d1763e.tar.gz
Support showing the agent build allocation plans
Diffstat (limited to 'guix-build-coordinator/client-communication.scm')
-rw-r--r--guix-build-coordinator/client-communication.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm
index efec797..9ba0594 100644
--- a/guix-build-coordinator/client-communication.scm
+++ b/guix-build-coordinator/client-communication.scm
@@ -179,6 +179,16 @@
#:description (assoc-ref body "description"))))
(render-json
`((agent-id . ,uuid)))))
+ (('GET "agent" agent-id)
+ (let ((agent-details (datastore-find-agent datastore agent-id)))
+ (render-json
+ `((id . ,agent-id)
+ ,@agent-details
+ (build_allocation_plan . ,(list->vector
+ (datastore-list-allocation-plan-builds
+ datastore
+ agent-id
+ 2048))))))) ; TODO Do something with this
(('POST "agent" agent-id "passwords")
(let ((password (new-agent-password
datastore