]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/cmdparse: emit proper json
authorSage Weil <sage@newdream.net>
Tue, 1 Jun 2021 20:55:44 +0000 (16:55 -0400)
committerSage Weil <sage@newdream.net>
Fri, 4 Jun 2021 20:56:17 +0000 (16:56 -0400)
commitec293f34b1ca74243f0af70180d5025e5866f231
treeffc47940358c0ecc0b646c96cf79976b8aea141f
parentb6b5ecc210d7e4044cefd83fb4e59dbe88aaef12
common/cmdparse: emit proper json

Instead of '"req": "false"', emit '"req": false'.  Same for conditional.

Luckily, the clients don't really care about this change, as
ceph_argparse.py argdesc interpets the JSON like so:

            self.req = req in (True, 'True', 'true')
            self.positional = positional in (True, 'True', 'true')

Clean up command definitions to use lowercase 'false', but tolerate
both for backward compat during upgrade and to tolerate future errors.

Signed-off-by: Sage Weil <sage@newdream.net>
src/common/cmdparse.cc
src/mgr/MgrCommands.h
src/mon/MonCommands.h