]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: mark optional positional arguments as such in help output 45008/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 8 Feb 2022 09:11:49 +0000 (10:11 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 13 Feb 2022 17:08:54 +0000 (18:08 +0100)
commit17972530cedf59ef970724253cbb8c15e8a793cf
tree47cc6ea0b2c4527afd6d62af76e2fcb8bc9019be
parent45c1d15e01d9ebcfec68908acbf6a877f3e43fb7
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