From: Boris Ranto Date: Thu, 18 May 2017 18:51:32 +0000 (+0200) Subject: restful: Output sub-commands more clearly X-Git-Tag: v12.1.0~337^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f45a282be0df1e786a76573e6e3f6fead3469956;p=ceph-ci.git restful: Output sub-commands more clearly Signed-off-by: Boris Ranto --- diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index 6e643e862b5..1f4949bcce5 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -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(),