]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Fix "too few args validate"
authorDan Mick <dan.mick@inktank.com>
Fri, 2 Aug 2013 05:35:08 +0000 (22:35 -0700)
committerDan Mick <dan.mick@inktank.com>
Mon, 5 Aug 2013 18:20:30 +0000 (11:20 -0700)
commit9466a0b152beeab894be66c6528495ca01a1974a
tree97b94e3aac779384ff81561574659f78a5b9723c
parente5d9ac64df6569c801f644c222547b7ee623e15f
Fix "too few args validate"

Check that number of validated arguments matches the number of required
arguments in the signature.  Also, sort all possible matches by
length of signature.  This way "ceph osd crush set" and
"ceph osd crush set <args>" can work while still insisting that
extra args or too few args are errors.

Also, restructure and factor out some of the work of validate() to make
its inner loop smaller and hopefully more comprehensible.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/pybind/ceph_argparse.py