From 61cfa8883bcb0537e26c5e44f7116dc516f5590f Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 31 Jan 2021 10:22:22 +0000 Subject: Include tags in the agents response --- guix-build-coordinator/client-communication.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'guix-build-coordinator') 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 -- cgit v1.2.3