CEPH_GIT_VER="@CEPH_GIT_VER@"
CEPH_GIT_NICE_VER="@CEPH_GIT_NICE_VER@"
+# Flags from src/mon/Monitor.h
+FLAG_NOFORWARD = (1 << 0)
+FLAG_OBSOLETE = (1 << 1)
+FLAG_DEPRECATED = (1 << 2)
+
# Make life easier on developers:
# If in src/, and .libs and pybind exist here, assume we're running
# from a Ceph source dir and tweak PYTHONPATH and LD_LIBRARY_PATH
if not cmd['help']:
continue
+ if cmd['flags'] is not None and ((cmd['flags'] & (FLAG_OBSOLETE | FLAG_DEPRECATED)) != 0):
+ continue
concise = concise_sig(cmd['sig'])
if partial and not concise.startswith(partial):
continue
const string& helptext,
const string& module,
const string& perm,
- const string& avail)
+ const string& avail,
+ uint64_t flags)
{
jf->open_object_section(secname.c_str());
jf->open_array_section("sig");
jf->dump_string("module", module.c_str());
jf->dump_string("perm", perm.c_str());
jf->dump_string("avail", avail.c_str());
+ jf->dump_int("flags", flags);
jf->close_section(); // cmd
}
-
void cmdmap_dump(const cmdmap_t &cmdmap, Formatter *f)
{
assert(f != nullptr);
const std::string& helptext,
const std::string& module,
const std::string& perm,
- const std::string& avail);
+ const std::string& avail,
+ uint64_t flags);
bool cmdmap_from_json(std::vector<std::string> cmd, cmdmap_t *mapp,
std::stringstream &ss);
void cmdmap_dump(const cmdmap_t &cmdmap, ceph::Formatter *f);
ostringstream secname;
secname << "cmd" << setfill('0') << std::setw(3) << cmdnum;
dump_cmddesc_to_json(f, secname.str(), cp->cmdstring, cp->helpstring,
- cp->module, cp->perm, cp->availability);
+ cp->module, cp->perm, cp->availability, 0);
cmdnum++;
}
f->close_section(); // command_descriptions
dout(20) << "Dumping " << pyc.cmdstring << " (" << pyc.helpstring
<< ")" << dendl;
dump_cmddesc_to_json(&f, secname.str(), pyc.cmdstring, pyc.helpstring,
- "mgr", pyc.perm, "cli");
+ "mgr", pyc.perm, "cli", 0);
cmdnum++;
}
#if 0
ostringstream secname;
secname << "cmd" << setfill('0') << std::setw(3) << cmdnum;
dump_cmddesc_to_json(f, secname.str(), cp->cmdstring, cp->helpstring,
- cp->module, cp->perm, cp->availability);
+ cp->module, cp->perm, cp->availability, 0);
cmdnum++;
}
#endif
secname << "cmd" << setfill('0') << std::setw(3) << cmdnum;
dump_cmddesc_to_json(f, secname.str(),
cp->cmdstring, cp->helpstring, cp->module,
- cp->req_perms, cp->availability);
+ cp->req_perms, cp->availability, cp->flags);
cmdnum++;
}
f->close_section(); // command_descriptions
ostringstream secname;
secname << "cmd" << setfill('0') << std::setw(3) << cmdnum;
dump_cmddesc_to_json(f, secname.str(), cp->cmdstring, cp->helpstring,
- cp->module, cp->perm, cp->availability);
+ cp->module, cp->perm, cp->availability, 0);
cmdnum++;
}
f->close_section(); // command_descriptions