From: Laura Flores Date: Wed, 6 Apr 2022 15:22:30 +0000 (+0000) Subject: ceph.in: clarify the usage of `--format` in the ceph command X-Git-Tag: v17.2.1~49^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bc45a277d90eeead1e1c23560bfcdddddde24a8b;p=ceph.git ceph.in: clarify the usage of `--format` in the ceph command It is not clear to users in the output of `ceph --help` that the yaml formatter option is only valid for orch commands. Before: -f {json,json-pretty,xml,xml-pretty,plain,yaml}, --format {json,json-pretty,xml,xml-pretty,plain,yaml} After: -f {json,json-pretty,xml,xml-pretty,plain,yaml}, --format {json,json-pretty,xml,xml-pretty,plain,yaml} Note: yaml is only valid for orch commands Fixes: https://tracker.ceph.com/issues/53895 Signed-off-by: Laura Flores (cherry picked from commit 9fecbaf40c7e68f3eeefb0d90c7296c08c28ef2a) --- diff --git a/src/ceph.in b/src/ceph.in index d5023e6089ba6..1e2bf6e56d125 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -336,7 +336,8 @@ def parse_cmdargs(args=None, target='') -> Tuple[argparse.ArgumentParser, help="make less verbose") parser.add_argument('-f', '--format', choices=['json', 'json-pretty', - 'xml', 'xml-pretty', 'plain', 'yaml'], dest='output_format') + 'xml', 'xml-pretty', 'plain', 'yaml'], + help="Note: yaml is only valid for orch commands", dest='output_format') parser.add_argument('--connect-timeout', dest='cluster_timeout', type=int,