aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-build-coordinator/client-communication.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm
index 921cfe9..0ee446a 100644
--- a/guix-build-coordinator/client-communication.scm
+++ b/guix-build-coordinator/client-communication.scm
@@ -204,7 +204,19 @@
`((builds . ,(list->vector builds))))))
(('GET "agents")
(render-json
- `((agents . ,(list->vector (datastore-list-agents datastore))))))
+ `((agents
+ . ,(list->vector
+ (map (lambda (agent)
+ `(,@agent
+ (tags . ,(vector-map
+ (match-lambda*
+ ((index (key . value))
+ `((key . ,key)
+ (value . ,value))))
+ (datastore-fetch-agent-tags
+ datastore
+ (assq-ref agent 'uuid))))))
+ (datastore-list-agents datastore)))))))
(('POST "agents")
(let ((uuid (new-agent
datastore