]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
restful: Output sub-commands more clearly
authorBoris Ranto <branto@redhat.com>
Thu, 18 May 2017 18:51:32 +0000 (20:51 +0200)
committerBoris Ranto <branto@redhat.com>
Mon, 22 May 2017 17:21:28 +0000 (19:21 +0200)
Signed-off-by: Boris Ranto <branto@redhat.com>
src/pybind/mgr/restful/module.py

index 6e643e862b56e656c6ad7d42d85ba1de114a8f5f..1f4949bcce51d37f20481af18a52461e5616a849 100644 (file)
@@ -155,19 +155,35 @@ class CommandsRequest(object):
         return {
             'id': self.id,
             'running': map(
-                lambda x: (x.command, x.outs, x.outb),
+                lambda x: {
+                    'command': x.command,
+                    'outs': x.outs,
+                    'outb': x.outb,
+                },
                 self.running
             ),
             'finished': map(
-                lambda x: (x.command, x.outs, x.outb),
+                lambda x: {
+                    'command': x.command,
+                    'outs': x.outs,
+                    'outb': x.outb,
+                },
                 self.finished
             ),
             'waiting': map(
-                lambda x: (x.command, x.outs, x.outb),
+                lambda x: {
+                    'command': x.command,
+                    'outs': x.outs,
+                    'outb': x.outb,
+                },
                 self.waiting
             ),
             'failed': map(
-                lambda x: (x.command, x.outs, x.outb),
+                lambda x: {
+                    'command': x.command,
+                    'outs': x.outs,
+                    'outb': x.outb,
+                },
                 self.failed
             ),
             'is_waiting': self.is_waiting(),