Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
if len(childargs) >= 3 and childargs[0] == 'tell' and childargs[2] == 'help':
target = childargs[1].split('.')
if validate_target(target):
- if len(target) == 1:
- # TODO(Chang Liu): for "mon" target only, we should remove this
- # patch after pybind supports this target format.
- target.append("")
return do_extended_help(parser, childargs, target, None)
else:
print('target {0} doesn\'t exists, please pass correct target to tell command, such as mon.a/'
self.nametype = "mgr"
self.val = s
return
+ elif s == "mon":
+ self.nametype = "mon"
+ self.val = s
+ return
if s.find('.') == -1:
raise ArgumentFormat('CephName: no . in {0}'.format(s))
else:
if verbose:
print('{0} to {1}'.format(cmd, target[0]),
file=sys.stderr)
- if target[1] == '':
+ if len(target) < 2 or target[1] == '':
ret, outbuf, outs = run_in_thread(
cluster.mon_command, cmd, inbuf, timeout)
else: