]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: mark optional positional arguments as such in help output 45009/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:05:59 +0000 (18:05 +0100)
commit3ffa1e09013a95ed69f6811b1d44caafaddb9fff
treeff4710e8ca812f79d2aa80f9594aa16dab3e1651
parent6a80eb5cf7f76e2adabe2d41ab3237c4003791d0
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