

def lookup_cdn(self, cdn_id):
    cdn = self.cdns.get(cdn_id, None)
    if ((cdn is not None) and (len(cdn['edge_servers']) > 0)):
        return {
            'id': cdn['id'],
            'name': cdn['name'],
            'edge_server': random.choice(cdn['edge_servers']),
        }
    return None

dataset/ETHPy150Open CacheBrowser/cachebrowser/cachebrowser/bootstrap.py LocalBootstrapSource.lookup_cdn/original