]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc: convert get_clients() to work with multiple clusters
authorJosh Durgin <jdurgin@redhat.com>
Tue, 15 Mar 2016 22:04:23 +0000 (15:04 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Mon, 11 Apr 2016 21:36:05 +0000 (14:36 -0700)
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
teuthology/misc.py

index 326427f5cb9ce7f8b5a7b2b7bfa74468fa47579e..f5128fd8965a006a455d1ff2a0fbb8aaf22103bc 100644 (file)
@@ -1015,9 +1015,8 @@ def get_clients(ctx, roles):
     """
     for role in roles:
         assert isinstance(role, basestring)
-        PREFIX = 'client.'
-        assert role.startswith(PREFIX)
-        id_ = role[len(PREFIX):]
+        assert 'client.' in role
+        _, _, id_ = split_role(role)
         (remote,) = ctx.cluster.only(role).remotes.iterkeys()
         yield (id_, remote)