From: Nathan Hoad Date: Mon, 13 Apr 2026 14:26:34 +0000 (-0400) Subject: rgw: Add documentation for the --pretty-format option X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68355%2Fhead;p=ceph.git rgw: Add documentation for the --pretty-format option Fixes: http://tracker.ceph.com/issues/75988 Signed-off-by: Nathan Hoad --- diff --git a/doc/man/8/radosgw-admin.rst b/doc/man/8/radosgw-admin.rst index 163dcc89e0d8..57826dfd900a 100644 --- a/doc/man/8/radosgw-admin.rst +++ b/doc/man/8/radosgw-admin.rst @@ -820,6 +820,12 @@ Options Specify output format for certain operations. Supported formats: xml, json. +.. option:: --pretty-format + + Enable pretty formatting for JSON/XML output with indentation and newlines. + If no format is specified, default is true. Use ``--format `` to disable + for more compact output. + .. option:: --sync-stats Option for the 'user stats' command. When specified, it will update user stats with diff --git a/src/rgw/radosgw-admin/radosgw-admin.cc b/src/rgw/radosgw-admin/radosgw-admin.cc index 4e2c39d6a9cf..f8986f49f7fd 100644 --- a/src/rgw/radosgw-admin/radosgw-admin.cc +++ b/src/rgw/radosgw-admin/radosgw-admin.cc @@ -459,7 +459,8 @@ void usage() cout << " --bucket-index-max-shards override a zone/zonegroup's default bucket index shard count\n"; cout << " --fix besides checking bucket index, will also fix it\n"; cout << " --check-objects bucket check: rebuilds bucket index according to actual objects state\n"; - cout << " --format= specify output format for certain operations: xml, json\n"; + cout << " --format= specify output format for certain operations: xml, json (default: json)\n"; + cout << " --pretty-format enable pretty formatting for json/xml output\n"; cout << " --purge-data when specified, user removal will also purge all the\n"; cout << " user data\n"; cout << " --purge-keys when specified, subuser removal will also purge all the\n"; diff --git a/src/test/cli/radosgw-admin/help.t b/src/test/cli/radosgw-admin/help.t index fb68f164e344..f6744bb216b7 100644 --- a/src/test/cli/radosgw-admin/help.t +++ b/src/test/cli/radosgw-admin/help.t @@ -319,7 +319,8 @@ --bucket-index-max-shards override a zone/zonegroup's default bucket index shard count --fix besides checking bucket index, will also fix it --check-objects bucket check: rebuilds bucket index according to actual objects state - --format= specify output format for certain operations: xml, json + --format= specify output format for certain operations: xml, json (default: json) + --pretty-format enable pretty formatting for json/xml output --purge-data when specified, user removal will also purge all the user data --purge-keys when specified, subuser removal will also purge all the