From: Dongsheng Yang Date: Fri, 11 Mar 2016 07:39:23 +0000 (-0500) Subject: mon: Introduce command of 'auth rm' X-Git-Tag: v10.1.0~40^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0b1dfb19aaf5cacdfd0939d0d09926752be8da6;p=ceph.git mon: Introduce command of 'auth rm' Introduce command of "auth rm" as an alias of "auth del" Signed-off-by: Dongsheng Yang --- diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index 8f217fb527e..10003a10afe 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -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)) { diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 59e7aed51f9..3344a63eb22 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -219,6 +219,10 @@ COMMAND("auth del " \ "name=entity,type=CephString", \ "delete all caps for ", \ "auth", "rwx", "cli,rest") +COMMAND("auth rm " \ + "name=entity,type=CephString", \ + "remove all caps for ", \ + "auth", "rwx", "cli,rest") /* * Monitor commands (Monitor.cc)