From: Boris Ranto Date: Mon, 30 Oct 2017 14:43:38 +0000 (+0100) Subject: restful: Fix jsonification X-Git-Tag: v12.2.6~139^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=96f908bdb30da57abab7479b2ca3a0814c8a52ca;p=ceph.git restful: Fix jsonification The CommandsRequest.waiting is an array of arrays, not an array of command results and so it cannot be represented that way. This commit fixes that by outputting the array in json diretly. Signed-off-by: Boris Ranto (cherry picked from commit 7005c6c0f68d82776c11cdfdd1a56e06f27d5e66) --- diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index 6ce610b881f4..5125253e4667 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -177,11 +177,10 @@ class CommandsRequest(object): self.finished ), 'waiting': map( - lambda x: { - 'command': x.command, - 'outs': x.outs, - 'outb': x.outb, - }, + lambda x: map( + lambda y: common.humanify_command(y), + x + ), self.waiting ), 'failed': map(