From: Stefan Chivu Date: Mon, 3 Oct 2022 08:20:58 +0000 (+0000) Subject: rbd: Added namespace optarg for rbd device unmap X-Git-Tag: v18.1.0~1022^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=51ba25c05c8ec93b26fc0b4fe6f3e5b685093244;p=ceph.git rbd: Added namespace optarg for rbd device unmap When executing rbd device unmap, an explicit namespace optarg wasn't available Fixes: https://tracker.ceph.com/issues/57765 Signed-off-by: Stefan Chivu --- diff --git a/src/test/cli/rbd/help.t b/src/test/cli/rbd/help.t index 59de21c03661..35f781b371ac 100644 --- a/src/test/cli/rbd/help.t +++ b/src/test/cli/rbd/help.t @@ -671,19 +671,21 @@ rbd help device unmap usage: rbd device unmap [--device-type ] [--pool ] - [--image ] [--snap ] [--options ] + [--namespace ] [--image ] + [--snap ] [--options ] Unmap a rbd device. Positional arguments image, snapshot, or device specification - [/][@] or - + [/[/]][@] or Optional arguments -t [ --device-type ] arg device type [ggate, krbd (default), nbd] -p [ --pool ] arg pool name + --namespace arg namespace name --image arg image name --snap arg snapshot name -o [ --options ] arg device specific options diff --git a/src/tools/rbd/action/Device.cc b/src/tools/rbd/action/Device.cc index bfe60c273df7..078f944cc6de 100644 --- a/src/tools/rbd/action/Device.cc +++ b/src/tools/rbd/action/Device.cc @@ -195,8 +195,9 @@ 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_namespace_option(options, at::ARGUMENT_MODIFIER_NONE); at::add_image_option(options, at::ARGUMENT_MODIFIER_NONE); at::add_snap_option(options, at::ARGUMENT_MODIFIER_NONE); add_device_specific_options(options);