'Base URL from catalog
If scope is not \'project\', it may be that there is not catalog in
the auth_data. In such case, as long as the requested service is
\'identity\', we can use the original auth URL to build the base_url.
:param filters: Used to filter results
Filters can be:
- service: service type name such as compute, image, etc.
- region: service region name
- name: service name, only if service exists
- endpoint_type: type of endpoint such as
adminURL, publicURL, internalURL
- api_version: the version of api used to replace catalog version
- skip_path: skips the suffix path of the url and uses base URL
:rtype: string
:return: url with filters applied'

def base_url(self, filters, auth_data=None):

    if (auth_data is None):
        auth_data = self.get_auth()
    (token, _auth_data) = auth_data
    service = filters.get('service')
    region = filters.get('region')
    name = filters.get('name')
    endpoint_type = filters.get('endpoint_type', 'public')
    if (service is None):
        raise exceptions.EndpointNotFound('No    service    provided')
    if ('URL' in endpoint_type):
        endpoint_type = endpoint_type.replace('URL', '')
    _base_url = None
    catalog = _auth_data.get('catalog', [])
    service_catalog = [ep for ep in catalog if (ep['type'] == service)]
    if service_catalog:
        if (name is not None):
            service_catalog = [ep for ep in service_catalog if (ep['name'] == name)]
            if service_catalog:
                service_catalog = service_catalog[0]['endpoints']
            else:
                raise exceptions.EndpointNotFound(name)
        else:
            service_catalog = service_catalog[0]['endpoints']
    elif ((not catalog) and (service == 'identity')):
        msg = 'Got    an    empty    catalog.    Scope:    %s.    Falling    back    to    configured    URL    for    %s:    %s'
        LOG.debug(msg, self.scope, service, self.auth_url)
        return apply_url_filters(self.auth_url, filters)
    else:
        msg = 'No    matching    service    found    in    the    catalog.\nScope:    %s,    Credentials:    %s\nAuth    data:    %s\nService:    %s,    Region:    %s,    endpoint_type:    %s\nCatalog:    %s'
        raise exceptions.EndpointNotFound((msg % (self.scope, self.credentials, _auth_data, service, region, endpoint_type, catalog)))
    filtered_catalog = [ep for ep in service_catalog if (ep['interface'] == endpoint_type)]
    if (not filtered_catalog):
        filtered_catalog = service_catalog
    filtered_catalog = [ep for ep in filtered_catalog if (ep['region'] == region)]
    if (not filtered_catalog):
        filtered_catalog = [service_catalog[0]]
    _base_url = filtered_catalog[0].get('url', None)
    if (_base_url is None):
        raise exceptions.EndpointNotFound(service)
    return apply_url_filters(_base_url, filters)
