def get_datacenter(conn):
    datacenter_id = get_datacenter_id()

    for item in conn.list_datacenters()['items']:
        if item['id'] == datacenter_id:
            return item

    raise SaltCloudNotFound(
        'The specified datacenter \'{0}\' could not be found.'.format(
            datacenter_id
        )
    )
Get the endpoint to sign the file, either the full or prelim one.
dataset/ETHPy150Open saltstack/salt/salt/cloud/clouds/profitbricks.py/get_datacenter--crossover with--dataset/ETHPy150Open mozilla/addons-server/src/olympia/lib/crypto/packaged.py/get_endpoint