@classmethod
  def get_host_for_role(cls, keyname, role):
    """ Gets the ip of the host the given role runs on.

    Args:
      keyname: The SSH keypair name that uniquely identifies this AppScale
        deployment.
      role: A str, the role we are looking up the host for.
    """
    for node in cls.get_local_nodes_info(keyname):
      if role in node["jobs"]:
        return node["public_ip"]
dataset/ETHPy150Open AppScale/appscale-tools/lib/local_state.py/LocalState.get_host_for_role/original