ceph_argparse: increment matchcnt on kwargs
Currently when you pass a param in on the ceph cli as a kwarg
(--<param_name>) the matchcnt isn't incremented in the validate method
which is used to choose the right command signature.
This means currently things fail like:
ceph orchestrator rgw rm --realm_name=default --zone_name=default
no valid command found; 1 closest matches:
orchestrator rgw rm <realm_name> <zone_name>
Error EINVAL: invalid command
The '--realm_name' and '--zone_name' isn't counted to the matchcnt, so
'orchestrator rgw rm' isn't picked as the valid command.
This patch simply corrects this by incrementing matchcnt on the kwarg
validate path before calling shortcircuiting the loop.
Fixes: https://tracker.ceph.com/issues/43803
Signed-off-by: Matthew Oliver <moliver@suse.com>
(cherry picked from commit
cb37c9ee609864a078edf38d98608bd8cc18cbd7)
Conflicts:
test: exclude helper method from nosetest discovery
On nautilus the assertion helper was recognized by nosetest as a test
even though it doens't start with test_ prefix. Explicitely decorate it
with @nottest
Signed-off-by: Shyukri Shyukriev <shshyukriev@suse.com>