ceph-medic icon indicating copy to clipboard operation
ceph-medic copied to clipboard

add json output --format option

Open bigjust opened this issue 5 years ago • 1 comments

Adds a new flag --format, which takes either 'json' or 'term' (default). if 'json' returns a json structure of the results normally printed to the terminal

resolves #142, resolves #119

bigjust avatar Sep 29 '20 15:09 bigjust

@zmc I made some changes to pass around the terminal object to make it easier to pass around some state, and the runner object as well, which required some changes in the tests to account for the new structure. Also added the results to the metadata in order to output as json. We could dump the whole json structure, but i was going for terminal output compatibility/consistency

bigjust avatar Sep 29 '20 16:09 bigjust