]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Introduce command of 'auth rm'
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Fri, 11 Mar 2016 07:39:23 +0000 (02:39 -0500)
committerDongsheng Yang <dongsheng.yang@easystack.cn>
Fri, 11 Mar 2016 09:20:04 +0000 (04:20 -0500)
Introduce command of "auth rm" as an alias of "auth del"

Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
src/mon/AuthMonitor.cc
src/mon/MonCommands.h

index 8f217fb527e40a1ff94e211d60b0280b5e36838f..10003a10afe177c2f7755223d136232369e7fee0 100644 (file)
@@ -537,6 +537,7 @@ bool AuthMonitor::preprocess_command(MonOpRequestRef op)
   cmd_getval(g_ceph_context, cmdmap, "prefix", prefix);
   if (prefix == "auth add" ||
       prefix == "auth del" ||
+      prefix == "auth rm" ||
       prefix == "auth get-or-create" ||
       prefix == "auth get-or-create-key" ||
       prefix == "auth import" ||
@@ -990,7 +991,8 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op)
     wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
                                              get_last_committed() + 1));
     return true;
-  } else if (prefix == "auth del" && !entity_name.empty()) {
+  } else if ((prefix == "auth del" || prefix == "auto rm") &&
+             !entity_name.empty()) {
     KeyServerData::Incremental auth_inc;
     auth_inc.name = entity;
     if (!mon->key_server.contains(auth_inc.name)) {
index 59e7aed51f917db498d546caee14d560f5db525f..3344a63eb2250098de54c79ae6f094b2ea5d69c1 100644 (file)
@@ -219,6 +219,10 @@ COMMAND("auth del " \
        "name=entity,type=CephString", \
        "delete all caps for <name>", \
        "auth", "rwx", "cli,rest")
+COMMAND("auth rm " \
+       "name=entity,type=CephString", \
+       "remove all caps for <name>", \
+       "auth", "rwx", "cli,rest")
 
 /*
  * Monitor commands (Monitor.cc)