~ubuntu-branches/ubuntu/wily/horizon/wily-proposed

« back to all changes in this revision

Viewing changes to openstack_dashboard/api/base.py

  • Committer: Package Import Robot
  • Author(s): Corey Bryant
  • Date: 2015-09-28 15:15:11 UTC
  • mfrom: (0.21.1) (0.20.2)
  • Revision ID: package-import@ubuntu.com-20150928151511-vcwqte0tseefi9jr
Tags: 2:8.0.0~rc1-0ubuntu1
* d/watch: Update to cope with upstream rc versioning.
* New upstream release candidate for OpenStack Liberty.
* d/rules: Drop removal of .eggs directory in override_dh_auto_clean.
* d/control: Bump minimum pbr version to 1.8.
* d/control: Align dependencies with upstream.
* d/p/ubuntu_settings.patch: Rebased.

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
    raise exceptions.ServiceCatalogException(service_type)
326
326
 
327
327
 
328
 
def is_service_enabled(request, service_type, service_name=None):
 
328
def is_service_enabled(request, service_type):
329
329
    service = get_service_from_catalog(request.user.service_catalog,
330
330
                                       service_type)
331
331
    if service:
336
336
            # ignore region for identity
337
337
            if service['type'] == 'identity' or \
338
338
               _get_endpoint_region(endpoint) == region:
339
 
                if service_name:
340
 
                    return service.get('name') == service_name
341
 
                else:
342
 
                    return True
 
339
                return True
343
340
    return False
344
341
 
345
342