]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
beanstalk: Print tube stats in JSON format
authorZack Cerza <zack@redhat.com>
Fri, 22 Jul 2022 17:46:53 +0000 (11:46 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 22 Jul 2022 17:53:20 +0000 (11:53 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/beanstalk.py

index ff3afb6efbd66ac06d0d5bd48920c1ce477f2185..41e2acedd17d134f97d7884ed5d4130b2735335d 100644 (file)
@@ -1,4 +1,5 @@
 import beanstalkc
+import json
 import yaml
 import logging
 import pprint
@@ -196,7 +197,7 @@ def main(args):
             # it is not needed for pausing tubes
             watch_tube(connection, machine_type)
         if status:
-            print(stats_tube(connection, machine_type))
+            print(json.dumps(stats_tube(connection, machine_type)))
         elif pause_duration:
             pause_tube(connection, machine_type, pause_duration)
         elif delete: