]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Tue, 8 Feb 2022 09:11:49 +0000 (10:11 +0100)
commitcb0df397aae552adc80713ca0d59ed1ebfd3b1be
tree814cc5fb33cd0e296ed45ef930dc27e8956e752e
parent56e348e4ad84682d533ad422b75c1c6010d98e4f
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>
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