diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2022-01-22 10:37:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 10:37:20 +0100 |
commit | e1793ebbf0dba5038ec094939a81ff9327ced5e7 (patch) | |
tree | 5a8d5a40939edb3f65994a57f09ca40f0e8508c3 | |
parent | 67ee1fba6ce3c6bc8a0a3ff767f4148872c04be2 (diff) | |
parent | e1b4811bc324236892e43a6bb841d6278fe1584e (diff) | |
download | ceph-e1793ebbf0dba5038ec094939a81ff9327ced5e7.tar.gz |
Merge pull request #44669 from idryomov/wip-rbd-switch-arguments-fix
rbd: add missing switch arguments for recognition by get_command_spec()
Reviewed-by: Mykola Golub <mgolub@suse.com>
-rw-r--r-- | src/tools/rbd/ArgumentTypes.h | 3 | ||||
-rw-r--r-- | src/tools/rbd/action/Children.cc | 1 | ||||
-rw-r--r-- | src/tools/rbd/action/Device.cc | 4 | ||||
-rw-r--r-- | src/tools/rbd/action/Diff.cc | 1 | ||||
-rw-r--r-- | src/tools/rbd/action/Export.cc | 1 | ||||
-rw-r--r-- | src/tools/rbd/action/Migration.cc | 2 | ||||
-rw-r--r-- | src/tools/rbd/action/Nbd.cc | 2 | ||||
-rw-r--r-- | src/tools/rbd/action/Trash.cc | 2 | ||||
-rw-r--r-- | src/tools/rbd/action/TrashPurgeSchedule.cc | 2 | ||||
-rw-r--r-- | src/tools/rbd/action/Wnbd.cc | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/src/tools/rbd/ArgumentTypes.h b/src/tools/rbd/ArgumentTypes.h index 57473f31c65..39d374c64c3 100644 --- a/src/tools/rbd/ArgumentTypes.h +++ b/src/tools/rbd/ArgumentTypes.h @@ -87,7 +87,8 @@ static const std::string SKIP_QUIESCE("skip-quiesce"); static const std::string IGNORE_QUIESCE_ERROR("ignore-quiesce-error"); static const std::set<std::string> SWITCH_ARGUMENTS = { - WHOLE_OBJECT, NO_PROGRESS, PRETTY_FORMAT, VERBOSE, NO_ERR, SKIP_QUIESCE, + WHOLE_OBJECT, IMAGE_SHARED, IMAGE_THICK_PROVISION, IMAGE_FLATTEN, + NO_PROGRESS, PRETTY_FORMAT, VERBOSE, NO_ERR, SKIP_QUIESCE, IGNORE_QUIESCE_ERROR }; diff --git a/src/tools/rbd/action/Children.cc b/src/tools/rbd/action/Children.cc index f459e92b761..58e861b6928 100644 --- a/src/tools/rbd/action/Children.cc +++ b/src/tools/rbd/action/Children.cc @@ -157,6 +157,7 @@ int execute(const po::variables_map &vm, return 0; } +Shell::SwitchArguments switched_arguments({"all", "a", "descendants"}); Shell::Action action( {"children"}, {}, "Display children of an image or its snapshot.", "", &get_arguments, &execute); diff --git a/src/tools/rbd/action/Device.cc b/src/tools/rbd/action/Device.cc index 20cff569f9b..bfe60c273df 100644 --- a/src/tools/rbd/action/Device.cc +++ b/src/tools/rbd/action/Device.cc @@ -247,7 +247,9 @@ int execute_detach(const po::variables_map &vm, return (*get_device_operations(vm)->execute_detach)(vm, ceph_global_init_args); } -Shell::SwitchArguments switched_arguments({"read-only", "exclusive"}); +Shell::SwitchArguments switched_arguments({"exclusive", "force", "quiesce", + "read-only", "show-cookie"}); + Shell::Action action_list( {"device", "list"}, {"showmapped"}, "List mapped rbd images.", "", &get_list_arguments, &execute_list); diff --git a/src/tools/rbd/action/Diff.cc b/src/tools/rbd/action/Diff.cc index 3729469c50d..838ef6cc510 100644 --- a/src/tools/rbd/action/Diff.cc +++ b/src/tools/rbd/action/Diff.cc @@ -132,7 +132,6 @@ int execute(const po::variables_map &vm, return 0; } -Shell::SwitchArguments switched_arguments({at::WHOLE_OBJECT}); Shell::Action action( {"diff"}, {}, "Print extents that differ since a previous snap, or image creation.", "", diff --git a/src/tools/rbd/action/Export.cc b/src/tools/rbd/action/Export.cc index dff10c97e1a..ddcf0f2c30c 100644 --- a/src/tools/rbd/action/Export.cc +++ b/src/tools/rbd/action/Export.cc @@ -311,7 +311,6 @@ int execute_diff(const po::variables_map &vm, return 0; } -Shell::SwitchArguments switched_arguments({at::WHOLE_OBJECT}); Shell::Action action_diff( {"export-diff"}, {}, "Export incremental diff to file.", "", &get_arguments_diff, &execute_diff); diff --git a/src/tools/rbd/action/Migration.cc b/src/tools/rbd/action/Migration.cc index 05b15f1869c..1ce6201d964 100644 --- a/src/tools/rbd/action/Migration.cc +++ b/src/tools/rbd/action/Migration.cc @@ -406,6 +406,8 @@ int execute_commit(const po::variables_map &vm, return 0; } +Shell::SwitchArguments switched_arguments({"import-only"}); + Shell::Action action_prepare( {"migration", "prepare"}, {}, "Prepare image migration.", at::get_long_features_help(), &get_prepare_arguments, &execute_prepare); diff --git a/src/tools/rbd/action/Nbd.cc b/src/tools/rbd/action/Nbd.cc index f36537430c8..68345f43dd6 100644 --- a/src/tools/rbd/action/Nbd.cc +++ b/src/tools/rbd/action/Nbd.cc @@ -415,8 +415,6 @@ int execute_unmap_deprecated(const po::variables_map &vm, return execute_unmap(vm, ceph_global_args); } -Shell::SwitchArguments switched_arguments({"read-only", "exclusive"}); - Shell::Action action_show_deprecated( {"nbd", "list"}, {"nbd", "ls"}, "List the nbd devices already used.", "", &get_list_arguments_deprecated, &execute_list_deprecated, false); diff --git a/src/tools/rbd/action/Trash.cc b/src/tools/rbd/action/Trash.cc index cb4c8b8a93e..53831850857 100644 --- a/src/tools/rbd/action/Trash.cc +++ b/src/tools/rbd/action/Trash.cc @@ -518,7 +518,6 @@ int execute_restore(const po::variables_map &vm, return r; } - Shell::Action action_move( {"trash", "move"}, {"trash", "mv"}, "Move an image to the trash.", "", &get_move_arguments, &execute_move); @@ -531,7 +530,6 @@ Shell::Action action_purge( {"trash", "purge"}, {}, "Remove all expired images from trash.", "", &get_purge_arguments, &execute_purge); -Shell::SwitchArguments switched_arguments({"long", "l"}); Shell::Action action_list( {"trash", "list"}, {"trash", "ls"}, "List trash images.", "", &get_list_arguments, &execute_list); diff --git a/src/tools/rbd/action/TrashPurgeSchedule.cc b/src/tools/rbd/action/TrashPurgeSchedule.cc index f090754c4b9..0f92e762bc2 100644 --- a/src/tools/rbd/action/TrashPurgeSchedule.cc +++ b/src/tools/rbd/action/TrashPurgeSchedule.cc @@ -332,6 +332,8 @@ int execute_status(const po::variables_map &vm, return 0; } +Shell::SwitchArguments switched_arguments({"recursive", "R"}); + Shell::Action add_action( {"trash", "purge", "schedule", "add"}, {}, "Add trash purge schedule.", "", &get_arguments_add, &execute_add); diff --git a/src/tools/rbd/action/Wnbd.cc b/src/tools/rbd/action/Wnbd.cc index 4da6be33b5d..ae40fe538e3 100644 --- a/src/tools/rbd/action/Wnbd.cc +++ b/src/tools/rbd/action/Wnbd.cc @@ -224,8 +224,6 @@ int execute_detach(const po::variables_map &vm, return -EOPNOTSUPP; } -Shell::SwitchArguments switched_arguments({"read-only", "exclusive"}); - } // namespace wnbd } // namespace action } // namespace rbd |