]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph: always populate `targets` with ids_by_service()
authorKefu Chai <kchai@redhat.com>
Tue, 5 Sep 2017 08:05:44 +0000 (16:05 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 5 Sep 2017 17:49:20 +0000 (01:49 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph.in

index adb11c39b2aee45f77c10f6cabe17c94585677b6..4843fec9e0b5e576a79eb5e3d74b50f48163af42 100755 (executable)
@@ -1021,13 +1021,11 @@ def main():
     # of the form 'cmdNNN' followed by an array of argument descriptors)
     # as part of the validated argument JSON object
 
-    targets = [target]
-
     if target[1] == '*':
-        if target[0] == 'osd':
-            targets = [(target[0], o) for o in osdids()]
-        elif target[0] == 'mon':
-            targets = [(target[0], m) for m in monids()]
+        service = target[0]
+        targets = [(service, o) for o in ids_by_service(service)]
+    else:
+        targets = [target]
 
     final_ret = 0
     for target in targets: