*
* NONE - no flag assigned
* NOFORWARD - command may not be forwarded
+ * OBSOLETE - command is considered obsolete
*/
/*
}
}
+ if (mon_cmd->is_obsolete()) {
+ reply_command(m, -ENOTSUP,
+ "command is obsolete; please check usage and/or man page",
+ 0);
+ return;
+ }
+
if (session->proxy_con && mon_cmd->has_flag(MonCommand::FLAG_NOFORWARD)) {
dout(10) << "Got forward for noforward command " << m << dendl;
reply_command(m, -EINVAL, "forward for noforward command", rdata, 0);
// MonCommand flags
static const uint64_t FLAG_NONE = 0;
static const uint64_t FLAG_NOFORWARD = 1 << 0;
+ static const uint64_t FLAG_OBSOLETE = 1 << 1;
bool has_flag(uint64_t flag) const { return (flags & flag) != 0; }
void set_flag(uint64_t flag) { flags |= flag; }
availability == o->availability;
}
+ bool is_obsolete() const {
+ return has_flag(MonCommand::FLAG_OBSOLETE);
+ }
static void encode_array(const MonCommand *cmds, int size, bufferlist &bl) {
ENCODE_START(2, 1, bl);
uint16_t s = size;