Files
horizon/openstack_dashboard/dashboards/identity/domains/urls.py
Kenji Ishii cc94b0f202 Adding identity domains table
This patch adds the domain table to the identity domains panel
adn domain detail page.
Actions will be added in subsequent patches.

To test this patch, it needs to show domain panel and enable angular
feature for domain panel.

To show domain panel (after installing OpenStack with latest Devstack).
 - using backends except signed cookie as SESSION_ENGINE in local_settings.py.
   e.g memcached
----
CACHES = {
   'default': {
       'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
       'LOCATION': '127.0.0.1:11211',
   }
}
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
----

 - enable OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT in local_settings.py
----
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
----

After that, if admin user logged in, the user could see Domain panel and
could operate actions for domains like Create.

To test this patch, after above, set 'domains_panel': True in 'ANGULAR_FEATURES'.

Change-Id: Ib15e25a4cebe6de83f1c2f427490d5850d36b908
Partially-Implements: blueprint angularize-identity-tables
2017-01-12 13:55:46 +09:00

36 lines
1.3 KiB
Python

# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from django.conf import settings
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from horizon.browsers import views
from openstack_dashboard.dashboards.identity.domains import views as legacyView
if settings.ANGULAR_FEATURES.get('domains_panel'):
title = _("Domains")
urlpatterns = [
url('', views.AngularIndexView.as_view(title=title), name='index'),
]
else:
urlpatterns = [
url(r'^$', legacyView.IndexView.as_view(), name='index'),
url(r'^create$', legacyView.CreateDomainView.as_view(), name='create'),
url(r'^(?P<domain_id>[^/]+)/update/$',
legacyView.UpdateDomainView.as_view(), name='update')
]