def get_public_agents():
    """Provides a list of hostnames / private IPs that are public agents in the cluster"""
    agent_list = []
    agents = __get_all_agents()
    for agent in agents:
        for reservation in agent["reserved_resources"]:
            if "slave_public" in reservation:
                agent_list.append(agent["hostname"])

    return agent_list
def get_public_agents ( ) : agent_list = [ ] agents = __get_all_agents ( ) for agent in agents : for reservation in agent [ "reserved_resources" ] : if "slave_public" in reservation : agent_list . append ( agent [ "hostname" ] ) return agent_list
Provides a list of hostnames / private IPs that are public agents in the cluster