'Selects the endpoint to use based on provider specific values,
or overrides passed in by the user when setting up the driver.
:returns: url of the relevant endpoint for the driver'

def get_endpoint(self):

    service_type = self.service_type
    service_name = self.service_name
    service_region = self.service_region
    if self._ex_force_service_type:
        service_type = self._ex_force_service_type
    if self._ex_force_service_name:
        service_name = self._ex_force_service_name
    if self._ex_force_service_region:
        service_region = self._ex_force_service_region
    endpoint = self.service_catalog.get_endpoint(service_type=service_type, name=service_name, region=service_region)
    url = endpoint.url
    if (not url):
        raise LibcloudError('Could    not    find    specified    endpoint')
    return url
