Merge PR #26019 into master

* refs/pull/26019/head:
	mon: implement hiding commands in ceph tool

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2019-01-18 11:27:07 -06:00
commit 0a638eafd8
2 changed files with 3 additions and 4 deletions

View File

@ -43,6 +43,7 @@ FLAG_NOFORWARD = (1 << 0)
FLAG_OBSOLETE = (1 << 1)
FLAG_DEPRECATED = (1 << 2)
FLAG_POLL = (1 << 4)
FLAG_HIDDEN = (1 << 5)
# priorities from src/common/perf_counters.h
PRIO_CRITICAL = 10
@ -477,7 +478,7 @@ def format_help(cmddict, partial=None):
if not cmd['help']:
continue
flags = cmd.get('flags', 0)
if flags & (FLAG_OBSOLETE | FLAG_DEPRECATED):
if flags & (FLAG_OBSOLETE | FLAG_DEPRECATED | FLAG_HIDDEN):
continue
concise = concise_sig(cmd['sig'])
if partial and not concise.startswith(partial):

View File

@ -3112,9 +3112,7 @@ void Monitor::handle_command(MonOpRequestRef op)
paxos_service[PAXOS_MGR].get())->get_command_descs();
for (auto& c : leader_mon_commands) {
if (!c.is_hidden()) {
commands.push_back(c);
}
commands.push_back(c);
}
auto features = m->get_connection()->get_features();