From: Josh Durgin Date: Tue, 15 Mar 2016 22:04:23 +0000 (-0700) Subject: misc: convert get_clients() to work with multiple clusters X-Git-Tag: 1.1.0~615^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a6f0887d7a114767dbaeab1d8039dabfc370dfff;p=teuthology.git misc: convert get_clients() to work with multiple clusters Signed-off-by: Josh Durgin --- diff --git a/teuthology/misc.py b/teuthology/misc.py index 326427f5c..f5128fd89 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -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)