]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: accept --user, refuse -i 6590/head
authorIlya Dryomov <idryomov@redhat.com>
Sat, 14 Nov 2015 20:56:15 +0000 (21:56 +0100)
committerIlya Dryomov <idryomov@redhat.com>
Sat, 14 Nov 2015 21:35:19 +0000 (22:35 +0100)
--user is the equivalent of --id (mentioned in docs and ceph -h) and
used by at least a couple of qa scripts and teuthology.  Add it to the
list of valid rbd options - it's handled inside global_init() before
Shell:execute() is called.

OTOH allowing -i is bogus - global_init() wouldn't process it for
clients (CEPH_ENTITY_TYPE_CLIENT), which rbd tool is one of.  Drop it.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
src/test/cli/rbd/help.t
src/tools/rbd/Shell.cc

index 6457bded6c4aafee2f07cb907644bbf2251c30aa..502a6722bdced231f97d7d253c46e3789fabd0e8 100644 (file)
@@ -51,7 +51,8 @@
   Optional arguments:
     -c [ --conf ] arg     path to cluster configuration
     --cluster arg         cluster name
-    -i [ --id ] arg       client id (without 'client.' prefix)
+    --id arg              client id (without 'client.' prefix)
+    --user arg            client id (without 'client.' prefix)
     -n [ --name ] arg     client name
     -m [ --mon_host ] arg monitor host
     --secret arg          path to secret key (deprecated)
index f7dfeeb5efec6187d11c733f7464ababdea2b7c6..c71f8ffbb0cf0e22df864e0d644de6ca99b29283 100644 (file)
@@ -233,7 +233,8 @@ void Shell::get_global_options(po::options_description *opts) {
   opts->add_options()
     ("conf,c", po::value<std::string>(), "path to cluster configuration")
     ("cluster", po::value<std::string>(), "cluster name")
-    ("id,i", po::value<std::string>(), "client id (without 'client.' prefix)")
+    ("id", po::value<std::string>(), "client id (without 'client.' prefix)")
+    ("user", po::value<std::string>(), "client id (without 'client.' prefix)")
     ("name,n", po::value<std::string>(), "client name")
     ("mon_host,m", po::value<std::string>(), "monitor host")
     ("secret", po::value<Secret>(), "path to secret key (deprecated)")