]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: clarify the usage of `--format` in the ceph command
authorLaura Flores <lflores@redhat.com>
Wed, 6 Apr 2022 15:22:30 +0000 (15:22 +0000)
committerLaura Flores <lflores@redhat.com>
Thu, 12 May 2022 14:29:08 +0000 (09:29 -0500)
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 <lflores@redhat.com>
(cherry picked from commit 9fecbaf40c7e68f3eeefb0d90c7296c08c28ef2a)

src/ceph.in

index d5023e6089ba6c70f6428f21fafa21089304e8af..1e2bf6e56d12581170a3d8e96db44a3a6cac346a 100755 (executable)
@@ -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,