mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
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:
commit
0a638eafd8
@ -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):
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user