MonCommands: add new fields: modulename, perms, availability

To help optimize the REST API, we need to know whether the commands
are read (GET) or write (PUT/POST).  However, we also could use that
same info for permission/caps checking.  Add modulename/perms as
the required caps for each command to drive both needs.

The availability field is to control whether a command is displayed/
advertised through the CLI or REST interfaces; some commands aren't
really useful for REST, and we may want to invent REST-only commands;
also, this gives us a way to deprecate commands quickly and leave the
code, should that be desirable.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
MonCap: add parse_permstr() to interpret MonCommands req_perm fields

Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph.in: find_cmd_target() must now ignore ArgumentErrors from validate()

Signed-off-by: Dan Mick <dan.mick@inktank.com>
parse_permstr: no, really
ceph, api, ceph_argparse: accept new cmddesc fields

Accept 'module', 'perm', and 'avail'; send module & perm along with cmd
Let 'help' stay 'help' (no reason to rename it 'helptext' here)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Monitor, cmdparse: dump new fields (don't forget daemon commands too)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
api: cleanup
ceph, api, ceph_argparse: process new fields in cmddescs

Filter commands not tagged with 'cli' or 'rest' as appropriate
Process and pass back 'module' and 'perm'

Signed-off-by: Dan Mick <dan.mick@inktank.com>
MonCommands: remove "osd cluster_snap" from both cli and REST frontends

Signed-off-by: Dan Mick <dan.mick@inktank.com>
PGMonitor: first example of using 'module' and 'perm'

I want to get buyoff on this before continuing