summaryrefslogtreecommitdiffstats
path: root/src/ceph/qa/tasks/util/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ceph/qa/tasks/util/__init__.py')
-rw-r--r--src/ceph/qa/tasks/util/__init__.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/ceph/qa/tasks/util/__init__.py b/src/ceph/qa/tasks/util/__init__.py
deleted file mode 100644
index 5b8575e..0000000
--- a/src/ceph/qa/tasks/util/__init__.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from teuthology import misc
-
-def get_remote(ctx, cluster, service_type, service_id):
- """
- Get the Remote for the host where a particular role runs.
-
- :param cluster: name of the cluster the service is part of
- :param service_type: e.g. 'mds', 'osd', 'client'
- :param service_id: The third part of a role, e.g. '0' for
- the role 'ceph.client.0'
- :return: a Remote instance for the host where the
- requested role is placed
- """
- def _is_instance(role):
- role_tuple = misc.split_role(role)
- return role_tuple == (cluster, service_type, str(service_id))
- try:
- (remote,) = ctx.cluster.only(_is_instance).remotes.keys()
- except ValueError:
- raise KeyError("Service {0}.{1}.{2} not found".format(cluster,
- service_type,
- service_id))
- return remote
-
-def get_remote_for_role(ctx, role):
- return get_remote(ctx, *misc.split_role(role))