From: Boris Ranto Date: Mon, 30 Oct 2017 14:43:38 +0000 (+0100) Subject: restful: Fix jsonification X-Git-Tag: v13.0.1~70^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7005c6c0f68d82776c11cdfdd1a56e06f27d5e66;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 --- diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index 1bb6f6e0fb35..acc7a1e69d10 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -176,11 +176,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(