Fix dump_json command
The dump_json command for both the request and status command are not clean making parsing error prone. dump_json position also seems to differ between status and create request command.
$ turbiniactl -a status --dump_json -r 1234456
<cut>'last_update': datetime.datetime(2021, 2, 4, 9, 37, 32, 357199)<cut>
$ turbiniactl --dump_json compresseddirectory -l /evidence/history.tgz
b'{"request_id": "9dcb333fae34432aa8560ff7c612e42c", <cut> "type": "TurbiniaRequest"}'
Looked at the code:
- dump_json in the create request context only dumps the json of the request but not actually creates the request
- dump_json in the context of the status context will output json status information as expected (but malformed)
I think we should rewrite this so that --dump_json is only on the main level (so $ turbiniactl --dump_json [the rest]) and will output json for commands that support it). Remove the option to only dump json and exit -> or is this used somewhere?
Draft PR -> https://github.com/google/turbinia/pull/714
Going to close this since the new client handles json output differently and we'll be deprecating this part of turbiniactl.