diff options
author | liuchang0812 <liuchang0812@gmail.com> | 2017-05-31 15:03:38 +0200 |
---|---|---|
committer | liuchang0812 <liuchang0812@gmail.com> | 2017-06-05 07:44:31 +0200 |
commit | f71e64bee3cd8b36824a0760999bb621c27f7235 (patch) | |
tree | 9867866dd67bbf3030f46adbfb3620ff2156b8e8 /src/pybind | |
parent | Merge pull request #15165 from badone/wip-cls-optimize-header-file-dependency (diff) | |
download | ceph-f71e64bee3cd8b36824a0760999bb621c27f7235.tar.xz ceph-f71e64bee3cd8b36824a0760999bb621c27f7235.zip |
pybind: support mon target, and clean up tool
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
Diffstat (limited to 'src/pybind')
-rw-r--r-- | src/pybind/ceph_argparse.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index f188d8f236a..54fbdeb49f2 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -395,6 +395,10 @@ class CephName(CephArgtype): 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: @@ -1262,7 +1266,7 @@ def send_command(cluster, target=('mon', ''), cmd=None, inbuf=b'', timeout=0, 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: |