]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: mark optional positional arguments as such in help output
authorIlya Dryomov <idryomov@gmail.com>
Tue, 8 Feb 2022 09:11:49 +0000 (10:11 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 16 Feb 2022 16:01:30 +0000 (17:01 +0100)
commit506c291d6ab8291eca523a74426105791a7c53e5
treed3401cce5ba6a361b5dfd3f34d6e1f119651a9a0
parentc29c1cba11054902d934eecac0bdd51d288e298c
rbd: mark optional positional arguments as such in help output

Currently at least five commands have optional positional arguments.

Overloading po::value<std::string>()->default_value("") for this
is a bit sneaky but nothing better fits into the existing Shell.cc
framework.

Note that strictly speaking "[<interval>] [<start-time>]" should be
"[<interval> [<start-time>]]" but we aren't doing that here because
"ceph" command doesn't do it either.

Fixes: https://tracker.ceph.com/issues/54191
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit cb0df397aae552adc80713ca0d59ed1ebfd3b1be)
src/test/cli/rbd/help.t
src/tools/rbd/OptionPrinter.cc
src/tools/rbd/Schedule.cc
src/tools/rbd/Schedule.h
src/tools/rbd/action/MirrorImage.cc
src/tools/rbd/action/MirrorSnapshotSchedule.cc
src/tools/rbd/action/TrashPurgeSchedule.cc