From d133eda8608ec2982aea4c83c23361175332b439 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Fri, 5 Jun 2020 14:34:52 +0100 Subject: [PATCH] rbd: use 'snap-name' instead of 'snapshot-name' in help examples to compact output. It is still not ideal though... Signed-off-by: Mykola Golub --- src/test/cli/rbd/help.t | 25 ++++++++++++------------- src/tools/rbd/ArgumentTypes.cc | 2 +- src/tools/rbd/action/Device.cc | 2 +- src/tools/rbd/action/Group.cc | 2 +- src/tools/rbd/action/Nbd.cc | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/test/cli/rbd/help.t b/src/test/cli/rbd/help.t index 5cf761e7526f8..6fa03762ce20c 100644 --- a/src/test/cli/rbd/help.t +++ b/src/test/cli/rbd/help.t @@ -229,8 +229,8 @@ Positional arguments source snapshot specification (example: - [/[/]]@) + [/[/]]@ + ) destination image specification (example: [/[/]]) @@ -615,8 +615,8 @@ Positional arguments image, snapshot, or device specification - [/][@] - or + [/][@] or + Optional arguments -t [ --device-type ] arg device type [ggate, krbd (default), nbd] @@ -993,7 +993,7 @@ (example: [/[/]]@) destination snapshot name - (example: ) + (example: ) Optional arguments -p [ --pool ] arg pool name @@ -2114,8 +2114,7 @@ Positional arguments snapshot specification (example: - [/[/]]@) + [/[/]]@) Optional arguments -p [ --pool ] arg pool name @@ -2190,7 +2189,7 @@ Positional arguments snapshot specification (example: - [/[/]]@) + [/[/]]@) Optional arguments -p [ --pool ] arg pool name @@ -2228,7 +2227,7 @@ Positional arguments snapshot specification (example: - [/[/]]@) + [/[/]]@) Optional arguments -p [ --pool ] arg pool name @@ -2253,10 +2252,10 @@ Positional arguments source snapshot specification (example: - [/[/]]@) + [/[/]]@) destination snapshot specification (example: - [/[/]]@) + [/[/]]@) Optional arguments -p [ --pool ] arg source pool name @@ -2278,7 +2277,7 @@ Positional arguments snapshot specification (example: - [/[/]]@) + [/[/]]@) Optional arguments -p [ --pool ] arg pool name @@ -2298,7 +2297,7 @@ Positional arguments snapshot specification (example: - [/[/]]@) + [/[/]]@) Optional arguments -p [ --pool ] arg pool name diff --git a/src/tools/rbd/ArgumentTypes.cc b/src/tools/rbd/ArgumentTypes.cc index f9c1d7cd6e94d..05c4f4af28baa 100644 --- a/src/tools/rbd/ArgumentTypes.cc +++ b/src/tools/rbd/ArgumentTypes.cc @@ -201,7 +201,7 @@ void add_snap_spec_options(po::options_description *pos, pos->add_options() ((get_name_prefix(modifier) + SNAPSHOT_SPEC).c_str(), (get_description_prefix(modifier) + "snapshot specification\n" + - "(example: [/[/]]@)").c_str()); + "(example: [/[/]]@)").c_str()); add_pool_option(opt, modifier); add_namespace_option(opt, modifier); add_image_option(opt, modifier); diff --git a/src/tools/rbd/action/Device.cc b/src/tools/rbd/action/Device.cc index 75988bd71c17b..fd0249b2031a7 100644 --- a/src/tools/rbd/action/Device.cc +++ b/src/tools/rbd/action/Device.cc @@ -153,7 +153,7 @@ void get_unmap_arguments(po::options_description *positional, positional->add_options() ("image-or-snap-or-device-spec", "image, snapshot, or device specification\n" - "[/][@] or "); + "[/][@] or "); at::add_pool_option(options, at::ARGUMENT_MODIFIER_NONE); at::add_image_option(options, at::ARGUMENT_MODIFIER_NONE); at::add_snap_option(options, at::ARGUMENT_MODIFIER_NONE); diff --git a/src/tools/rbd/action/Group.cc b/src/tools/rbd/action/Group.cc index 8554ae3b4ef03..1f48824ad7e6f 100644 --- a/src/tools/rbd/action/Group.cc +++ b/src/tools/rbd/action/Group.cc @@ -839,7 +839,7 @@ void get_group_snap_rename_arguments(po::options_description *positional, positional->add_options() (at::DEST_SNAPSHOT_NAME.c_str(), - "destination snapshot name\n(example: )"); + "destination snapshot name\n(example: )"); at::add_snap_option(options, at::ARGUMENT_MODIFIER_DEST); } diff --git a/src/tools/rbd/action/Nbd.cc b/src/tools/rbd/action/Nbd.cc index ab62e9a7bf835..8b0a43bc32651 100644 --- a/src/tools/rbd/action/Nbd.cc +++ b/src/tools/rbd/action/Nbd.cc @@ -263,7 +263,7 @@ void get_unmap_arguments_deprecated(po::options_description *positional, positional->add_options() ("image-or-snap-or-device-spec", "image, snapshot, or device specification\n" - "[/][@] or "); + "[/][@] or "); at::add_pool_option(options, at::ARGUMENT_MODIFIER_NONE); at::add_image_option(options, at::ARGUMENT_MODIFIER_NONE); at::add_snap_option(options, at::ARGUMENT_MODIFIER_NONE); -- 2.39.5