static const uint64_t FLAG_DEPRECATED = 1 << 2;
static const uint64_t FLAG_MGR = 1 << 3;
static const uint64_t FLAG_POLL = 1 << 4;
+ static const uint64_t FLAG_HIDDEN = 1 << 5;
bool has_flag(uint64_t flag) const { return (flags & flag) != 0; }
void set_flag(uint64_t flag) { flags |= flag; }
return has_flag(MonCommand::FLAG_MGR);
}
+ bool is_hidden() const {
+ return has_flag(MonCommand::FLAG_HIDDEN);
+ }
+
static void encode_array(const MonCommand *cmds, int size, bufferlist &bl) {
ENCODE_START(2, 1, bl);
uint16_t s = size;
* MGR - command goes to ceph-mgr (for luminous+)
* POLL - command is intended to be called periodically by the
* client (see iostat)
+ * HIDDEN - command is hidden (no reported by help etc)
*
* A command should always be first considered DEPRECATED before being
* considered OBSOLETE, giving due consideration to users and conforming
paxos_service[PAXOS_MGR].get())->get_command_descs();
for (auto& c : leader_mon_commands) {
- commands.push_back(c);
+ if (!c.is_hidden()) {
+ commands.push_back(c);
+ }
}
format_command_descriptions(commands, f, &rdata);