def test_to_negotiate_uri(self, test): ''' Map test to its negotiate URI ''' if test in self.avail: # Do not cache results (see runner_hosts comment on that) result = self.avail[test][0] self.avail.clear() return result else: fqdn = RUNNER_HOSTS.get_random_static_host() endpoint = (fqdn, 8080) uri = 'http://%s/' % utils_net.format_epnt(endpoint) return uri