Commit Graph

7 Commits

Author SHA1 Message Date
Sage Weil
daf7672309 ceph: drop --threshold hack for 'pg dump_stuck'
We can live with the incompatibility here; the hack is currently
not working anyway (see #5623).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-07-15 14:05:21 -07:00
Dan Mick
2e2bc6d023 ceph_argparse.py cleanup: simplify some code, error on unused args
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 19:02:30 -07:00
Dan Mick
a5621625e1 ceph CLI: valid() no longer returns bool, but just exception
The type validation's valid() method was using a combination of
return code and exception to really indicate the same thing;
simplify by only raising on validation error, and change callers
to cope.  validate_one() follows suit.

Also, allow validate() to be called with args that are dicts
(for REST support) rather than bare words.  Rules: 'name':'value'
must both match descriptor's name and validate (through valid() for
the value.  If value is '', it's assumed to be the same as name,
(one can pass, for example, "detail" as one parameter to
REST, but it will still show up as {'detail':''} here).

Tweak validate()'s algorithm a bit in the process, and make
validate_command() exit the bestcmds loop immediately on first
full validation.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 19:02:30 -07:00
Dan Mick
0f2ebc6ee3 ceph.in, ceph_argparse.py: move descsort() to ceph_argparse
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 19:02:30 -07:00
Dan Mick
bfa2284d21 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.  Make the CLI display only commands
marked with the 'CLI' marker.

Also stop renaming 'help' to 'helptext' in the client.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 19:02:30 -07:00
Dan Mick
94eada4046 Add header comments and Inktank copyrights to ceph.in/ceph_argparse.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-21 18:39:59 -07:00
Dan Mick
67a3c1e48d ceph.in: rip out reusable code to pybind/ceph_argparse.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>

Conflicts:
	src/ceph.in
2013-06-21 18:39:43 -07:00