aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-09 21:43:55 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-10 20:34:47 +0100
commitb53717dc09b87fd6c2d245e841620c91b918e994 (patch)
tree74f150becd59e2f4ab755b4999abcd9029a1cc43 /scripts
parent27c7e0dfe269627372100870b54a0381b6f26d03 (diff)
downloadbuild-coordinator-b53717dc09b87fd6c2d245e841620c91b918e994.tar
build-coordinator-b53717dc09b87fd6c2d245e841620c91b918e994.tar.gz
Add the ability to list agents
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index 298c9fe..3ef7ace 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -135,6 +135,17 @@
#:requested-uuid (assq-ref opts 'uuid)
#:description (assq-ref opts 'description))))
(simple-format #t "agent created as as ~A\n" uuid))))
+ (("agent" "list" rest ...)
+ (let ((opts (parse-options %base-options %base-option-defaults rest)))
+ (for-each (lambda (agent)
+ (simple-format
+ #t "~A: ~A\n"
+ (assq-ref agent 'uuid)
+ (or (assq-ref agent 'description)
+ "(no description)")))
+ (datastore-list-agents
+ (database-uri->datastore
+ (assq-ref opts 'database))))))
((arguments ...)
(let* ((opts (parse-options (append %service-options
%base-options)