Address RemovedInDjango40Warning (3)

In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path().

https://docs.djangoproject.com/en/4.0/releases/3.1/#id2

Change-Id: I484694f8718f61c022126a1935cf28fce075894b
This commit is contained in:
Akihiro Motoki 2022-01-27 00:07:02 +09:00
parent cd7c1b5110
commit d9266fd82c
89 changed files with 725 additions and 710 deletions

View File

@ -458,13 +458,13 @@ URLs
---- ----
The auto-generated ``urls.py`` file is like:: The auto-generated ``urls.py`` file is like::
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.mydashboard.mypanel import views from openstack_dashboard.dashboards.mydashboard.mypanel import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -209,12 +209,12 @@ urls.py
Now that we have a panel, we need to provide a URL so that users can visit our Now that we have a panel, we need to provide a URL so that users can visit our
new panel! This URL generally will point to a view.:: new panel! This URL generally will point to a view.::
from django.conf.urls import url from django.urls import re_path
from myplugin.content.mypanel import views from myplugin.content.mypanel import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]
views.py views.py

View File

@ -176,17 +176,17 @@ the ``mypanel`` directory and add the following as a new url pattern::
The complete ``urls.py`` file should look like this:: The complete ``urls.py`` file should look like this::
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.mydashboard.mypanel import views from openstack_dashboard.dashboards.mydashboard.mypanel import views
urlpatterns = [ urlpatterns = [
url(r'^$', re_path(r'^$',
views.IndexView.as_view(), name='index'), views.IndexView.as_view(), name='index'),
url(r'^(?P<instance_id>[^/]+)/create_snapshot/$', re_path(r'^(?P<instance_id>[^/]+)/create_snapshot/$',
views.CreateSnapshotView.as_view(), views.CreateSnapshotView.as_view(),
name='create_snapshot'), name='create_snapshot'),
] ]

View File

@ -31,8 +31,8 @@ import os
from django.conf import settings from django.conf import settings
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.urls import re_path
from django.urls import reverse from django.urls import reverse
from django.utils.functional import empty from django.utils.functional import empty
from django.utils.functional import SimpleLazyObject from django.utils.functional import SimpleLazyObject
@ -550,14 +550,15 @@ class Dashboard(Registry, HorizonComponent):
default_panel = panel default_panel = panel
continue continue
url_slug = panel.slug.replace('.', '/') url_slug = panel.slug.replace('.', '/')
urlpatterns.append(url(r'^%s/' % url_slug, urlpatterns.append(
_wrapped_include(panel._decorated_urls))) re_path(r'^%s/' % url_slug,
_wrapped_include(panel._decorated_urls)))
# Now the default view, which should come last # Now the default view, which should come last
if not default_panel: if not default_panel:
raise NotRegistered('The default panel "%s" is not registered.' raise NotRegistered('The default panel "%s" is not registered.'
% self.default_panel) % self.default_panel)
urlpatterns.append( urlpatterns.append(
url(r'', _wrapped_include(default_panel._decorated_urls))) re_path(r'', _wrapped_include(default_panel._decorated_urls)))
# Apply access controls to all views in the patterns # Apply access controls to all views in the patterns
permissions = getattr(self, 'permissions', []) permissions = getattr(self, 'permissions', [])
@ -871,8 +872,9 @@ class Site(Registry, HorizonComponent):
# Compile the dynamic urlconf. # Compile the dynamic urlconf.
for dash in self._registry.values(): for dash in self._registry.values():
urlpatterns.append(url(r'^%s/' % dash.slug, urlpatterns.append(
_wrapped_include(dash._decorated_urls))) re_path(r'^%s/' % dash.slug,
_wrapped_include(dash._decorated_urls)))
# Return the three arguments to django.conf.urls.include # Return the three arguments to django.conf.urls.include
return urlpatterns, self.namespace, self.slug return urlpatterns, self.namespace, self.slug

View File

@ -10,11 +10,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from {{ dash_path }}.{{ panel_name }} import views from {{ dash_path }}.{{ panel_name }} import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -18,7 +18,7 @@
from django.conf import settings from django.conf import settings
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from django.utils import timezone from django.utils import timezone
from django.views.decorators.http import last_modified from django.views.decorators.http import last_modified
from django.views.generic import TemplateView from django.views.generic import TemplateView
@ -28,28 +28,28 @@ from horizon.test.jasmine import jasmine
from horizon import views from horizon import views
urlpatterns = [ urlpatterns = [
url(r'^home/$', views.user_home, name='user_home') re_path(r'^home/$', views.user_home, name='user_home')
] ]
last_modified_date = timezone.now() last_modified_date = timezone.now()
# Client-side i18n URLconf. # Client-side i18n URLconf.
urlpatterns.extend([ urlpatterns.extend([
url(r'^i18n/js/(?P<packages>\S+?)/$', re_path(r'^i18n/js/(?P<packages>\S+?)/$',
last_modified(lambda req, **kw: last_modified_date)( last_modified(lambda req, **kw: last_modified_date)(
i18n.JavaScriptCatalog.as_view()), i18n.JavaScriptCatalog.as_view()),
name='jsi18n'), name='jsi18n'),
url(r'^i18n/setlang/$', re_path(r'^i18n/setlang/$',
i18n.set_language, i18n.set_language,
name="set_language"), name="set_language"),
url(r'^i18n/', include('django.conf.urls.i18n')) re_path(r'^i18n/', include('django.conf.urls.i18n'))
]) ])
if settings.DEBUG: if settings.DEBUG:
urlpatterns.extend([ urlpatterns.extend([
url(r'^jasmine-legacy/$', re_path(r'^jasmine-legacy/$',
TemplateView.as_view( TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"), template_name="horizon/jasmine/jasmine_legacy.html"),
name='jasmine_tests'), name='jasmine_tests'),
url(r'^jasmine/.*?$', jasmine.dispatcher), re_path(r'^jasmine/.*?$', jasmine.dispatcher),
]) ])

View File

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from horizon.test.test_dashboards.cats.kittens.views import IndexView from horizon.test.test_dashboards.cats.kittens.views import IndexView
urlpatterns = [ urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'), re_path(r'^$', IndexView.as_view(), name='index'),
] ]

View File

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from horizon.test.test_dashboards.cats.tigers.views import IndexView from horizon.test.test_dashboards.cats.tigers.views import IndexView
urlpatterns = [ urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'), re_path(r'^$', IndexView.as_view(), name='index'),
] ]

View File

@ -10,12 +10,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from horizon.test.test_dashboards.dogs.puppies.views import IndexView from horizon.test.test_dashboards.dogs.puppies.views import IndexView
from horizon.test.test_dashboards.dogs.puppies.views import TwoTabsView from horizon.test.test_dashboards.dogs.puppies.views import TwoTabsView
urlpatterns = [ urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'), re_path(r'^$', IndexView.as_view(), name='index'),
url(r'^tabs/$', TwoTabsView.as_view(), name='tabs'), re_path(r'^tabs/$', TwoTabsView.as_view(), name='tabs'),
] ]

View File

@ -21,9 +21,9 @@ URL patterns for testing Horizon views.
""" """
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url
from django.contrib.auth import views from django.contrib.auth import views
from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import re_path
from django.views.generic import TemplateView from django.views.generic import TemplateView
import horizon import horizon
@ -32,16 +32,16 @@ from horizon.test.jasmine import jasmine
urlpatterns = [ urlpatterns = [
url(r'', horizon.base._wrapped_include(horizon.urls)), re_path(r'', horizon.base._wrapped_include(horizon.urls)),
url(r"auth/login/", re_path(r"auth/login/",
views.LoginView.as_view(template_name="auth/login.html"), views.LoginView.as_view(template_name="auth/login.html"),
name='login'), name='login'),
url(r'auth/', include('django.contrib.auth.urls')), re_path(r'auth/', include('django.contrib.auth.urls')),
url(r'^jasmine/.*?$', jasmine.dispatcher), re_path(r'^jasmine/.*?$', jasmine.dispatcher),
url(r'^jasmine-legacy/$', re_path(r'^jasmine-legacy/$',
TemplateView.as_view( TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"), template_name="horizon/jasmine/jasmine_legacy.html"),
name='jasmine_tests'), name='jasmine_tests'),
] ]
urlpatterns += staticfiles_urlpatterns() urlpatterns += staticfiles_urlpatterns()

View File

@ -12,14 +12,15 @@
# limitations under the License. # limitations under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from django.views import generic from django.views import generic
from openstack_auth import views from openstack_auth import views
urlpatterns = [ urlpatterns = [
url(r"", include('openstack_auth.urls')), re_path(r"", include('openstack_auth.urls')),
url(r"^websso/$", views.websso, name='websso'), re_path(r"^websso/$", views.websso, name='websso'),
url(r"^$", generic.TemplateView.as_view(template_name="auth/blank.html")) re_path(r"^$",
generic.TemplateView.as_view(template_name="auth/blank.html"))
] ]

View File

@ -12,7 +12,7 @@
# limitations under the License. # limitations under the License.
from django.conf import settings from django.conf import settings
from django.conf.urls import url from django.urls import re_path
from django.views import generic from django.views import generic
from openstack_auth import utils from openstack_auth import utils
@ -20,30 +20,31 @@ from openstack_auth import views
urlpatterns = [ urlpatterns = [
url(r"^login/$", views.login, name='login'), re_path(r"^login/$", views.login, name='login'),
url(r"^logout/$", views.logout, name='logout'), re_path(r"^logout/$", views.logout, name='logout'),
url(r'^switch/(?P<tenant_id>[^/]+)/$', views.switch, re_path(r'^switch/(?P<tenant_id>[^/]+)/$', views.switch,
name='switch_tenants'), name='switch_tenants'),
url(r'^switch_services_region/(?P<region_name>[^/]+)/$', re_path(r'^switch_services_region/(?P<region_name>[^/]+)/$',
views.switch_region, views.switch_region,
name='switch_services_region'), name='switch_services_region'),
url(r'^switch_keystone_provider/(?P<keystone_provider>[^/]+)/$', re_path(r'^switch_keystone_provider/(?P<keystone_provider>[^/]+)/$',
views.switch_keystone_provider, views.switch_keystone_provider,
name='switch_keystone_provider'), name='switch_keystone_provider'),
url(r'^switch_system_scope/$', re_path(r'^switch_system_scope/$',
views.switch_system_scope, views.switch_system_scope,
name='switch_system_scope'), name='switch_system_scope'),
] ]
if utils.allow_expired_passowrd_change(): if utils.allow_expired_passowrd_change():
urlpatterns.append( urlpatterns.append(
url(r'^password/(?P<user_id>[^/]+)/$', views.PasswordView.as_view(), re_path(r'^password/(?P<user_id>[^/]+)/$',
name='password') views.PasswordView.as_view(),
name='password')
) )
if settings.WEBSSO_ENABLED: if settings.WEBSSO_ENABLED:
urlpatterns += [ urlpatterns += [
url(r"^websso/$", views.websso, name='websso'), re_path(r"^websso/$", views.websso, name='websso'),
url(r"^error/$", re_path(r"^error/$",
generic.TemplateView.as_view(template_name="403.html")) generic.TemplateView.as_view(template_name="403.html"))
] ]

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from django.conf import urls
from django.urls import re_path
urlpatterns = [] urlpatterns = []
@ -27,6 +28,6 @@ def register(view):
as_view() method. The url_regex attribute of the view should be a standard as_view() method. The url_regex attribute of the view should be a standard
Django URL regex pattern. Django URL regex pattern.
""" """
p = urls.url(view.url_regex, view.as_view()) p = re_path(view.url_regex, view.as_view())
urlpatterns.append(p) urlpatterns.append(p)
return view return view

View File

@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.contrib.developer.form_builder import views from openstack_dashboard.contrib.developer.form_builder import views
urlpatterns = [ urlpatterns = [
url('', views.IndexView.as_view(), name='index'), re_path('', views.IndexView.as_view(), name='index'),
] ]

View File

@ -14,11 +14,11 @@
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.contrib.developer.profiler import views from openstack_dashboard.contrib.developer.profiler import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
urlpatterns = [ urlpatterns = [
url('', AngularIndexView.as_view(), name='index'), re_path('', AngularIndexView.as_view(), name='index'),
] ]

View File

@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.contrib.developer.theme_preview import views from openstack_dashboard.contrib.developer.theme_preview import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -10,19 +10,19 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.aggregates \ from openstack_dashboard.dashboards.admin.aggregates \
import views import views
urlpatterns = [ urlpatterns = [
url(r'^$', re_path(r'^$',
views.IndexView.as_view(), name='index'), views.IndexView.as_view(), name='index'),
url(r'^create/$', re_path(r'^create/$',
views.CreateView.as_view(), name='create'), views.CreateView.as_view(), name='create'),
url(r'^(?P<id>[^/]+)/update/$', re_path(r'^(?P<id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^(?P<id>[^/]+)/manage_hosts/$', re_path(r'^(?P<id>[^/]+)/manage_hosts/$',
views.ManageHostsView.as_view(), name='manage_hosts'), views.ManageHostsView.as_view(), name='manage_hosts'),
] ]

View File

@ -10,20 +10,20 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.backups import views from openstack_dashboard.dashboards.admin.backups import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.AdminBackupsView.as_view(), name='index'), re_path(r'^$', views.AdminBackupsView.as_view(), name='index'),
url(r'^(?P<backup_id>[^/]+)/$', re_path(r'^(?P<backup_id>[^/]+)/$',
views.AdminBackupDetailView.as_view(), views.AdminBackupDetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<backup_id>[^/]+)/restore/$', re_path(r'^(?P<backup_id>[^/]+)/restore/$',
views.AdminRestoreBackupView.as_view(), views.AdminRestoreBackupView.as_view(),
name='restore'), name='restore'),
url(r'^(?P<backup_id>[^/]+)/update_status$', re_path(r'^(?P<backup_id>[^/]+)/update_status$',
views.UpdateStatusView.as_view(), views.UpdateStatusView.as_view(),
name='update_status'), name='update_status'),
] ]

View File

@ -12,13 +12,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.defaults import views from openstack_dashboard.dashboards.admin.defaults import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^update_defaults$', re_path(r'^update_defaults$',
views.UpdateDefaultQuotasView.as_view(), name='update_defaults'), views.UpdateDefaultQuotasView.as_view(), name='update_defaults'),
] ]

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -28,16 +28,17 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'flavors_panel'):
title = _("Flavors") title = _("Flavors")
# New angular panel # New angular panel
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
url(r'^create/$', AngularIndexView.as_view(title=title), re_path(r'^create/$', AngularIndexView.as_view(title=title),
name='create'), name='create'),
url(r'^(?P<id>[^/]+)/update/$', AngularIndexView.as_view(title=title), re_path(r'^(?P<id>[^/]+)/update/$',
name='index'), AngularIndexView.as_view(title=title),
name='index'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<id>[^/]+)/update/$', re_path(r'^(?P<id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
] ]

View File

@ -13,14 +13,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.floating_ips import views from openstack_dashboard.dashboards.admin.floating_ips import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^allocate/$', views.AllocateView.as_view(), name='allocate'), re_path(r'^allocate/$', views.AllocateView.as_view(), name='allocate'),
url(r'^(?P<floating_ip_id>[^/]+)/detail/$', re_path(r'^(?P<floating_ip_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail') views.DetailView.as_view(), name='detail')
] ]

View File

@ -10,13 +10,15 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.group_types.specs \ from openstack_dashboard.dashboards.admin.group_types.specs \
import views import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'), re_path(r'^(?P<key>[^/]+)/edit/$',
views.EditView.as_view(),
name='edit'),
] ]

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.group_types.specs \ from openstack_dashboard.dashboards.admin.group_types.specs \
import urls as specs_urls import urls as specs_urls
@ -20,12 +20,12 @@ from openstack_dashboard.dashboards.admin.group_types \
urlpatterns = [ urlpatterns = [
url(r'^$', views.GroupTypesView.as_view(), name='index'), re_path(r'^$', views.GroupTypesView.as_view(), name='index'),
url(r'^create_type$', views.CreateGroupTypeView.as_view(), re_path(r'^create_type$', views.CreateGroupTypeView.as_view(),
name='create_type'), name='create_type'),
url(r'^(?P<type_id>[^/]+)/update_type/$', re_path(r'^(?P<type_id>[^/]+)/update_type/$',
views.EditGroupTypeView.as_view(), views.EditGroupTypeView.as_view(),
name='update_type'), name='update_type'),
url(r'^(?P<type_id>[^/]+)/specs/', re_path(r'^(?P<type_id>[^/]+)/specs/',
include((specs_urls, 'specs'))), include((specs_urls, 'specs'))),
] ]

View File

@ -10,19 +10,19 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.hypervisors.compute import views from openstack_dashboard.dashboards.admin.hypervisors.compute import views
urlpatterns = [ urlpatterns = [
url(r'^(?P<compute_host>[^/]+)/evacuate_host$', re_path(r'^(?P<compute_host>[^/]+)/evacuate_host$',
views.EvacuateHostView.as_view(), views.EvacuateHostView.as_view(),
name='evacuate_host'), name='evacuate_host'),
url(r'^(?P<compute_host>[^/]+)/disable_service$', re_path(r'^(?P<compute_host>[^/]+)/disable_service$',
views.DisableServiceView.as_view(), views.DisableServiceView.as_view(),
name='disable_service'), name='disable_service'),
url(r'^(?P<compute_host>[^/]+)/migrate_host$', re_path(r'^(?P<compute_host>[^/]+)/migrate_host$',
views.MigrateHostView.as_view(), views.MigrateHostView.as_view(),
name='migrate_host'), name='migrate_host'),
] ]

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.hypervisors.compute \ from openstack_dashboard.dashboards.admin.hypervisors.compute \
import urls as compute_urls import urls as compute_urls
@ -21,9 +21,9 @@ from openstack_dashboard.dashboards.admin.hypervisors import views
urlpatterns = [ urlpatterns = [
url(r'^(?P<hypervisor>[^/]+)/$', re_path(r'^(?P<hypervisor>[^/]+)/$',
views.AdminDetailView.as_view(), views.AdminDetailView.as_view(),
name='detail'), name='detail'),
url(r'^$', views.AdminIndexView.as_view(), name='index'), re_path(r'^$', views.AdminIndexView.as_view(), name='index'),
url(r'', include((compute_urls, 'compute'))), re_path(r'', include((compute_urls, 'compute'))),
] ]

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -27,16 +27,16 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'):
title = _("Images") title = _("Images")
# New angular images # New angular images
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
url(r'^(?P<image_id>[^/]+)/detail/$', re_path(r'^(?P<image_id>[^/]+)/detail/$',
AngularIndexView.as_view(title=title), name='detail'), AngularIndexView.as_view(title=title), name='detail'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<image_id>[^/]+)/update/$', re_path(r'^(?P<image_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^(?P<image_id>[^/]+)/detail/$', re_path(r'^(?P<image_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail') views.DetailView.as_view(), name='detail')
] ]

View File

@ -16,11 +16,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.info import views from openstack_dashboard.dashboards.admin.info import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.instances import views from openstack_dashboard.dashboards.admin.instances import views
@ -25,15 +25,16 @@ INSTANCES = r'^(?P<instance_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(r'^$', views.AdminIndexView.as_view(), name='index'), re_path(r'^$', views.AdminIndexView.as_view(), name='index'),
url(INSTANCES % 'update', views.AdminUpdateView.as_view(), name='update'), re_path(INSTANCES % 'update', views.AdminUpdateView.as_view(),
url(INSTANCES % 'detail', views.DetailView.as_view(), name='detail'), name='update'),
url(INSTANCES % 'console', views.console, name='console'), re_path(INSTANCES % 'detail', views.DetailView.as_view(), name='detail'),
url(INSTANCES % 'vnc', views.vnc, name='vnc'), re_path(INSTANCES % 'console', views.console, name='console'),
url(INSTANCES % 'mks', views.mks, name='mks'), re_path(INSTANCES % 'vnc', views.vnc, name='vnc'),
url(INSTANCES % 'spice', views.spice, name='spice'), re_path(INSTANCES % 'mks', views.mks, name='mks'),
url(INSTANCES % 'rdp', views.rdp, name='rdp'), re_path(INSTANCES % 'spice', views.spice, name='spice'),
url(INSTANCES % 'live_migrate', views.LiveMigrateView.as_view(), re_path(INSTANCES % 'rdp', views.rdp, name='rdp'),
name='live_migrate'), re_path(INSTANCES % 'live_migrate', views.LiveMigrateView.as_view(),
url(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'), name='live_migrate'),
re_path(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.metadata_defs import views from openstack_dashboard.dashboards.admin.metadata_defs import views
@ -21,10 +21,10 @@ NAMESPACES = r'^(?P<namespace_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(r'^$', views.AdminIndexView.as_view(), name='index'), re_path(r'^$', views.AdminIndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(NAMESPACES % 'update', views.UpdateView.as_view(), name='update'), re_path(NAMESPACES % 'update', views.UpdateView.as_view(), name='update'),
url(NAMESPACES % 'detail', views.DetailView.as_view(), name='detail'), re_path(NAMESPACES % 'detail', views.DetailView.as_view(), name='detail'),
url(r'^(?P<id>[^/]+)/resource_types/$', re_path(r'^(?P<id>[^/]+)/resource_types/$',
views.ManageResourceTypes.as_view(), name='resource_types'), views.ManageResourceTypes.as_view(), name='resource_types'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.networks.ports import views from openstack_dashboard.dashboards.admin.networks.ports import views
from openstack_dashboard.dashboards.admin.networks.ports.extensions. \ from openstack_dashboard.dashboards.admin.networks.ports.extensions. \
@ -22,8 +22,8 @@ PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
url(PORTS % 'addallowedaddresspairs', re_path(PORTS % 'addallowedaddresspairs',
addr_pairs_views.AddAllowedAddressPair.as_view(), addr_pairs_views.AddAllowedAddressPair.as_view(),
name='addallowedaddresspairs'), name='addallowedaddresspairs'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.networks.subnets import views from openstack_dashboard.dashboards.admin.networks.subnets import views
@ -21,5 +21,5 @@ SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'), re_path(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'),
] ]

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.networks.agents \ from openstack_dashboard.dashboards.admin.networks.agents \
import views as agent_views import views as agent_views
@ -32,27 +32,27 @@ NETWORKS = r'^(?P<network_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(NETWORKS % 'update', views.UpdateView.as_view(), name='update'), re_path(NETWORKS % 'update', views.UpdateView.as_view(), name='update'),
url(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'), re_path(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'),
url(NETWORKS % r'detail\?tab=network_tabs__ports_tab$', re_path(NETWORKS % r'detail\?tab=network_tabs__ports_tab$',
views.DetailView.as_view(), name='ports_tab'), views.DetailView.as_view(), name='ports_tab'),
url(NETWORKS % r'detail\?tab=network_tabs__agents_tab$', re_path(NETWORKS % r'detail\?tab=network_tabs__agents_tab$',
views.DetailView.as_view(), name='agents_tab'), views.DetailView.as_view(), name='agents_tab'),
url(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$', re_path(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$',
views.DetailView.as_view(), name='subnets_tab'), views.DetailView.as_view(), name='subnets_tab'),
url(NETWORKS % 'agents/add', re_path(NETWORKS % 'agents/add',
agent_views.AddView.as_view(), name='adddhcpagent'), agent_views.AddView.as_view(), name='adddhcpagent'),
url(NETWORKS % 'subnets/create', re_path(NETWORKS % 'subnets/create',
subnet_views.CreateView.as_view(), name='createsubnet'), subnet_views.CreateView.as_view(), name='createsubnet'),
url(NETWORKS % 'ports/create', re_path(NETWORKS % 'ports/create',
port_views.CreateView.as_view(), name='addport'), port_views.CreateView.as_view(), name='addport'),
url(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$', re_path(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$',
subnet_views.UpdateView.as_view(), name='editsubnet'), subnet_views.UpdateView.as_view(), name='editsubnet'),
url(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', re_path(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$',
port_views.UpdateView.as_view(), name='editport'), port_views.UpdateView.as_view(), name='editport'),
url(r'^subnets/', include((subnet_urls, 'subnets'))), re_path(r'^subnets/', include((subnet_urls, 'subnets'))),
url(r'^ports/', include((port_urls, 'ports'))), re_path(r'^ports/', include((port_urls, 'ports'))),
] ]

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.ngflavors import views from openstack_dashboard.dashboards.admin.ngflavors import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -17,11 +17,11 @@
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.overview import views from openstack_dashboard.dashboards.admin.overview import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.GlobalOverview.as_view(), name='index'), re_path(r'^$', views.GlobalOverview.as_view(), name='index'),
] ]

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.rbac_policies import views from openstack_dashboard.dashboards.admin.rbac_policies import views
@ -19,12 +19,12 @@ RBAC_POLICY_URL = r'^(?P<rbac_policy_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(RBAC_POLICY_URL % '$', re_path(RBAC_POLICY_URL % '$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(RBAC_POLICY_URL % 'update', re_path(RBAC_POLICY_URL % 'update',
views.UpdateView.as_view(), views.UpdateView.as_view(),
name='update'), name='update'),
] ]

View File

@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.routers.ports import views from openstack_dashboard.dashboards.admin.routers.ports import views
PORTS = r'^(?P<port_id>[^/]+)/%s$' PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.routers import views from openstack_dashboard.dashboards.admin.routers import views
@ -21,15 +21,15 @@ ROUTER_URL = r'^(?P<router_id>[^/]+)/%s'
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(ROUTER_URL % '$', re_path(ROUTER_URL % '$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(ROUTER_URL % 'update', re_path(ROUTER_URL % 'update',
views.UpdateView.as_view(), views.UpdateView.as_view(),
name='update'), name='update'),
url(r'^(?P<l3_agent_id>[^/]+)/l3_agent_list', re_path(r'^(?P<l3_agent_id>[^/]+)/l3_agent_list',
views.L3AgentView.as_view(), views.L3AgentView.as_view(),
name='l3_agent_list'), name='l3_agent_list'),
] ]

View File

@ -10,17 +10,17 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.snapshots import views from openstack_dashboard.dashboards.admin.snapshots import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.SnapshotsView.as_view(), name='index'), re_path(r'^$', views.SnapshotsView.as_view(), name='index'),
url(r'^(?P<snapshot_id>[^/]+)$', re_path(r'^(?P<snapshot_id>[^/]+)$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<snapshot_id>[^/]+)/update_status/$', re_path(r'^(?P<snapshot_id>[^/]+)/update_status/$',
views.UpdateStatusView.as_view(), views.UpdateStatusView.as_view(),
name='update_status'), name='update_status'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -20,7 +20,7 @@ from horizon.browsers.views import AngularIndexView
title = _("Trunks") title = _("Trunks")
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
url(r'^(?P<trunk_id>[^/]+)/$', re_path(r'^(?P<trunk_id>[^/]+)/$',
AngularIndexView.as_view(title=title), name='detail'), AngularIndexView.as_view(title=title), name='detail'),
] ]

View File

@ -12,13 +12,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.vg_snapshots import views from openstack_dashboard.dashboards.admin.vg_snapshots import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<vg_snapshot_id>[^/]+)/detail/$', re_path(r'^(?P<vg_snapshot_id>[^/]+)/detail/$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
] ]

View File

@ -12,23 +12,23 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.volume_groups import views from openstack_dashboard.dashboards.admin.volume_groups import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<group_id>[^/]+)$', re_path(r'^(?P<group_id>[^/]+)$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<group_id>[^/]+)/remove_volumese/$', re_path(r'^(?P<group_id>[^/]+)/remove_volumese/$',
views.RemoveVolumesView.as_view(), views.RemoveVolumesView.as_view(),
name='remove_volumes'), name='remove_volumes'),
url(r'^(?P<group_id>[^/]+)/delete/$', re_path(r'^(?P<group_id>[^/]+)/delete/$',
views.DeleteView.as_view(), views.DeleteView.as_view(),
name='delete'), name='delete'),
url(r'^(?P<group_id>[^/]+)/manage/$', re_path(r'^(?P<group_id>[^/]+)/manage/$',
views.ManageView.as_view(), views.ManageView.as_view(),
name='manage'), name='manage'),
] ]

View File

@ -10,13 +10,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.volume_types.extras \ from openstack_dashboard.dashboards.admin.volume_types.extras \
import views import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'), re_path(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'),
] ]

View File

@ -10,15 +10,16 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.volume_types.qos_specs \ from openstack_dashboard.dashboards.admin.volume_types.qos_specs \
import views import views
urlpatterns = [ urlpatterns = [
url(r'^(?P<qos_spec_id>[^/]+)/create/$', re_path(r'^(?P<qos_spec_id>[^/]+)/create/$',
views.CreateKeyValuePairView.as_view(), name='create'), views.CreateKeyValuePairView.as_view(), name='create'),
url(r'^(?P<qos_spec_id>[^/]+)/$', views.IndexView.as_view(), name='index'), re_path(r'^(?P<qos_spec_id>[^/]+)/$',
url(r'^(?P<qos_spec_id>[^/]+)/key/(?P<key>[^/]+)/edit/$', views.IndexView.as_view(), name='index'),
views.EditKeyValuePairView.as_view(), name='edit'), re_path(r'^(?P<qos_spec_id>[^/]+)/key/(?P<key>[^/]+)/edit/$',
views.EditKeyValuePairView.as_view(), name='edit'),
] ]

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.volume_types.extras \ from openstack_dashboard.dashboards.admin.volume_types.extras \
import urls as extras_urls import urls as extras_urls
@ -22,33 +22,33 @@ from openstack_dashboard.dashboards.admin.volume_types \
urlpatterns = [ urlpatterns = [
url(r'^$', views.VolumeTypesView.as_view(), name='index'), re_path(r'^$', views.VolumeTypesView.as_view(), name='index'),
url(r'^create_type$', views.CreateVolumeTypeView.as_view(), re_path(r'^create_type$', views.CreateVolumeTypeView.as_view(),
name='create_type'), name='create_type'),
url(r'^(?P<type_id>[^/]+)/update_type/$', re_path(r'^(?P<type_id>[^/]+)/update_type/$',
views.EditVolumeTypeView.as_view(), views.EditVolumeTypeView.as_view(),
name='update_type'), name='update_type'),
url(r'^create_qos_spec$', views.CreateQosSpecView.as_view(), re_path(r'^create_qos_spec$', views.CreateQosSpecView.as_view(),
name='create_qos_spec'), name='create_qos_spec'),
url(r'^(?P<type_id>[^/]+)/manage_qos_spec_association/$', re_path(r'^(?P<type_id>[^/]+)/manage_qos_spec_association/$',
views.ManageQosSpecAssociationView.as_view(), views.ManageQosSpecAssociationView.as_view(),
name='manage_qos_spec_association'), name='manage_qos_spec_association'),
url(r'^(?P<qos_spec_id>[^/]+)/edit_qos_spec_consumer/$', re_path(r'^(?P<qos_spec_id>[^/]+)/edit_qos_spec_consumer/$',
views.EditQosSpecConsumerView.as_view(), views.EditQosSpecConsumerView.as_view(),
name='edit_qos_spec_consumer'), name='edit_qos_spec_consumer'),
url(r'^(?P<type_id>[^/]+)/extras/', re_path(r'^(?P<type_id>[^/]+)/extras/',
include((extras_urls, 'extras'))), include((extras_urls, 'extras'))),
url(r'^(?P<volume_type_id>[^/]+)/create_type_encryption/$', re_path(r'^(?P<volume_type_id>[^/]+)/create_type_encryption/$',
views.CreateVolumeTypeEncryptionView.as_view(), views.CreateVolumeTypeEncryptionView.as_view(),
name='create_type_encryption'), name='create_type_encryption'),
url(r'^(?P<volume_type_id>[^/]+)/update_type_encryption/$', re_path(r'^(?P<volume_type_id>[^/]+)/update_type_encryption/$',
views.UpdateVolumeTypeEncryptionView.as_view(), views.UpdateVolumeTypeEncryptionView.as_view(),
name='update_type_encryption'), name='update_type_encryption'),
url(r'^(?P<volume_type_id>[^/]+)/type_encryption_detail/$', re_path(r'^(?P<volume_type_id>[^/]+)/type_encryption_detail/$',
views.VolumeTypeEncryptionDetailView.as_view(), views.VolumeTypeEncryptionDetailView.as_view(),
name='type_encryption_detail'), name='type_encryption_detail'),
url(r'^qos_specs/', re_path(r'^qos_specs/',
include((qos_specs_urls, 'qos_specs'))), include((qos_specs_urls, 'qos_specs'))),
url(r'^(?P<volume_type_id>[^/]+)/edit_access/$', re_path(r'^(?P<volume_type_id>[^/]+)/edit_access/$',
views.EditAccessView.as_view(), name='edit_access'), views.EditAccessView.as_view(), name='edit_access'),
] ]

View File

@ -10,28 +10,28 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.admin.volumes import views from openstack_dashboard.dashboards.admin.volumes import views
urlpatterns = [ urlpatterns = [
url(r'^$', re_path(r'^$',
views.VolumesView.as_view(), views.VolumesView.as_view(),
name='index'), name='index'),
url(r'^manage/$', re_path(r'^manage/$',
views.ManageVolumeView.as_view(), views.ManageVolumeView.as_view(),
name='manage'), name='manage'),
url(r'^(?P<volume_id>[^/]+)/$', re_path(r'^(?P<volume_id>[^/]+)/$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<volume_id>[^/]+)/update_status$', re_path(r'^(?P<volume_id>[^/]+)/update_status$',
views.UpdateStatusView.as_view(), views.UpdateStatusView.as_view(),
name='update_status'), name='update_status'),
url(r'^(?P<volume_id>[^/]+)/unmanage$', re_path(r'^(?P<volume_id>[^/]+)/unmanage$',
views.UnmanageVolumeView.as_view(), views.UnmanageVolumeView.as_view(),
name='unmanage'), name='unmanage'),
url(r'^(?P<volume_id>[^/]+)/migrate$', re_path(r'^(?P<volume_id>[^/]+)/migrate$',
views.MigrateVolumeView.as_view(), views.MigrateVolumeView.as_view(),
name='migrate'), name='migrate'),
] ]

View File

@ -13,23 +13,23 @@
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.identity.application_credentials \ from openstack_dashboard.dashboards.identity.application_credentials \
import views import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<application_credential_id>[^/]+)/detail/$', re_path(r'^(?P<application_credential_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail'), views.DetailView.as_view(), name='detail'),
url(r'^success/$', re_path(r'^success/$',
views.CreateSuccessfulView.as_view(), name='success'), views.CreateSuccessfulView.as_view(), name='success'),
url(r'^download_openrc/$', re_path(r'^download_openrc/$',
views.download_rc_file, name='download_openrc'), views.download_rc_file, name='download_openrc'),
url(r'^download_kubeconfig/$', re_path(r'^download_kubeconfig/$',
views.download_kubeconfig_file, name='download_kubeconfig'), views.download_kubeconfig_file, name='download_kubeconfig'),
url(r'^download_clouds_yaml/$', re_path(r'^download_clouds_yaml/$',
views.download_clouds_yaml_file, name='download_clouds_yaml'), views.download_clouds_yaml_file, name='download_clouds_yaml'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers import views from horizon.browsers import views
@ -24,12 +24,13 @@ from openstack_dashboard.utils import settings as setting_utils
if setting_utils.get_dict_config('ANGULAR_FEATURES', 'domains_panel'): if setting_utils.get_dict_config('ANGULAR_FEATURES', 'domains_panel'):
title = _("Domains") title = _("Domains")
urlpatterns = [ urlpatterns = [
url('', views.AngularIndexView.as_view(title=title), name='index'), re_path('', views.AngularIndexView.as_view(title=title), name='index'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', legacyView.IndexView.as_view(), name='index'), re_path(r'^$', legacyView.IndexView.as_view(), name='index'),
url(r'^create$', legacyView.CreateDomainView.as_view(), name='create'), re_path(r'^create$',
url(r'^(?P<domain_id>[^/]+)/update/$', legacyView.CreateDomainView.as_view(), name='create'),
legacyView.UpdateDomainView.as_view(), name='update') re_path(r'^(?P<domain_id>[^/]+)/update/$',
legacyView.UpdateDomainView.as_view(), name='update')
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -24,16 +24,16 @@ from openstack_dashboard.utils import settings as setting_utils
if setting_utils.get_dict_config('ANGULAR_FEATURES', 'groups_panel'): if setting_utils.get_dict_config('ANGULAR_FEATURES', 'groups_panel'):
title = panel.Groups.name title = panel.Groups.name
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateView.as_view(), name='create'), re_path(r'^create$', views.CreateView.as_view(), name='create'),
url(r'^(?P<group_id>[^/]+)/update/$', re_path(r'^(?P<group_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^(?P<group_id>[^/]+)/manage_members/$', re_path(r'^(?P<group_id>[^/]+)/manage_members/$',
views.ManageMembersView.as_view(), name='manage_members'), views.ManageMembersView.as_view(), name='manage_members'),
url(r'^(?P<group_id>[^/]+)/add_members/$', re_path(r'^(?P<group_id>[^/]+)/add_members/$',
views.NonMembersView.as_view(), name='add_members'), views.NonMembersView.as_view(), name='add_members'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.identity.identity_providers.protocols \ from openstack_dashboard.dashboards.identity.identity_providers.protocols \
import views import views
@ -20,5 +20,5 @@ from openstack_dashboard.dashboards.identity.identity_providers.protocols \
PORTS = r'^(?P<protocol_id>[^/]+)/%s$' PORTS = r'^(?P<protocol_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(r'^create/$', views.AddProtocolView.as_view(), name='create'), re_path(r'^create/$', views.AddProtocolView.as_view(), name='create'),
] ]

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.identity.identity_providers.protocols \ from openstack_dashboard.dashboards.identity.identity_providers.protocols \
import urls as protocol_urls import urls as protocol_urls
@ -21,16 +21,16 @@ from openstack_dashboard.dashboards.identity.identity_providers \
import views import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<identity_provider_id>[^/]+)/detail/$', re_path(r'^(?P<identity_provider_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail'), views.DetailView.as_view(), name='detail'),
url(r'^(?P<identity_provider_id>[^/]+)/detail/' re_path(r'^(?P<identity_provider_id>[^/]+)/detail/'
r'\?tab=idp_details__protocols$', r'\?tab=idp_details__protocols$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='protocols_tab'), name='protocols_tab'),
url(r'^(?P<identity_provider_id>[^/]+)/update/$', re_path(r'^(?P<identity_provider_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^register/$', views.RegisterView.as_view(), name='register'), re_path(r'^register/$', views.RegisterView.as_view(), name='register'),
url(r'(?P<identity_provider_id>[^/]+)/protocols/', re_path(r'(?P<identity_provider_id>[^/]+)/protocols/',
include((protocol_urls, 'protocols'))), include((protocol_urls, 'protocols'))),
] ]

View File

@ -12,13 +12,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.identity.mappings import views from openstack_dashboard.dashboards.identity.mappings import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<mapping_id>[^/]+)/update/$', re_path(r'^(?P<mapping_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
] ]

View File

@ -16,20 +16,20 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.identity.projects import views from openstack_dashboard.dashboards.identity.projects import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateProjectView.as_view(), name='create'), re_path(r'^create$', views.CreateProjectView.as_view(), name='create'),
url(r'^(?P<tenant_id>[^/]+)/update/$', re_path(r'^(?P<tenant_id>[^/]+)/update/$',
views.UpdateProjectView.as_view(), name='update'), views.UpdateProjectView.as_view(), name='update'),
url(r'^(?P<project_id>[^/]+)/usage/$', re_path(r'^(?P<project_id>[^/]+)/usage/$',
views.ProjectUsageView.as_view(), name='usage'), views.ProjectUsageView.as_view(), name='usage'),
url(r'^(?P<project_id>[^/]+)/detail/$', re_path(r'^(?P<project_id>[^/]+)/detail/$',
views.DetailProjectView.as_view(), name='detail'), views.DetailProjectView.as_view(), name='detail'),
url(r'^(?P<tenant_id>[^/]+)/update_quotas/$', re_path(r'^(?P<tenant_id>[^/]+)/update_quotas/$',
views.UpdateQuotasView.as_view(), name='update_quotas'), views.UpdateQuotasView.as_view(), name='update_quotas'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -24,12 +24,12 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'roles_panel'):
# New angular panel # New angular panel
title = _('Roles') title = _('Roles')
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<role_id>[^/]+)/update/$', re_path(r'^(?P<role_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
] ]

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -28,16 +28,16 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'users_panel'):
title = _("Users") title = _("Users")
# new angular panel # new angular panel
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<user_id>[^/]+)/update/$', re_path(r'^(?P<user_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<user_id>[^/]+)/detail/$', re_path(r'^(?P<user_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail'), views.DetailView.as_view(), name='detail'),
url(r'^(?P<user_id>[^/]+)/change_password/$', re_path(r'^(?P<user_id>[^/]+)/change_password/$',
views.ChangePasswordView.as_view(), name='change_password'), views.ChangePasswordView.as_view(), name='change_password'),
] ]

View File

@ -16,18 +16,19 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.api_access import views from openstack_dashboard.dashboards.project.api_access import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^ec2/$', views.download_ec2_bundle, name='ec2'), re_path(r'^ec2/$', views.download_ec2_bundle, name='ec2'),
url(r'^clouds.yaml/$', re_path(r'^clouds.yaml/$',
views.download_clouds_yaml_file, name='clouds.yaml'), views.download_clouds_yaml_file, name='clouds.yaml'),
url(r'^openrc/$', views.download_rc_file, name='openrc'), re_path(r'^openrc/$', views.download_rc_file, name='openrc'),
url(r'^view_credentials/$', views.CredentialsView.as_view(), re_path(r'^view_credentials/$', views.CredentialsView.as_view(),
name='view_credentials'), name='view_credentials'),
url(r'^recreate_ec2_credentials/$', re_path(r'^recreate_ec2_credentials/$',
views.RecreateCredentialsView.as_view(), name='recreate_credentials'), views.RecreateCredentialsView.as_view(),
name='recreate_credentials'),
] ]

View File

@ -10,17 +10,17 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.backups import views from openstack_dashboard.dashboards.project.backups import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.BackupsView.as_view(), name='index'), re_path(r'^$', views.BackupsView.as_view(), name='index'),
url(r'^(?P<backup_id>[^/]+)/$', re_path(r'^(?P<backup_id>[^/]+)/$',
views.BackupDetailView.as_view(), views.BackupDetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<backup_id>[^/]+)/restore/$', re_path(r'^(?P<backup_id>[^/]+)/restore/$',
views.RestoreBackupView.as_view(), views.RestoreBackupView.as_view(),
name='restore'), name='restore'),
] ]

View File

@ -16,14 +16,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.containers import views from openstack_dashboard.dashboards.project.containers import views
urlpatterns = [ urlpatterns = [
url(r'^container/((?P<container_name>.+?)/)?' re_path(r'^container/((?P<container_name>.+?)/)?'
'(?P<subfolder_path>.+)?$', '(?P<subfolder_path>.+)?$',
views.NgIndexView.as_view(), name='index'), views.NgIndexView.as_view(), name='index'),
url(r'^$', re_path(r'^$',
views.NgIndexView.as_view(), name='index') views.NgIndexView.as_view(), name='index')
] ]

View File

@ -16,12 +16,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.floating_ips import views from openstack_dashboard.dashboards.project.floating_ips import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^associate/$', views.AssociateView.as_view(), name='associate'), re_path(r'^associate/$', views.AssociateView.as_view(), name='associate'),
url(r'^allocate/$', views.AllocateView.as_view(), name='allocate'), re_path(r'^allocate/$', views.AllocateView.as_view(), name='allocate'),
] ]

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -27,14 +27,15 @@ from openstack_dashboard.utils import settings as setting_utils
if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'): if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'):
title = _("Images") title = _("Images")
urlpatterns = [ urlpatterns = [
url(r'^(?P<image_id>[^/]+)/$', AngularIndexView.as_view(title=title), re_path(r'^(?P<image_id>[^/]+)/$',
name='detail'), AngularIndexView.as_view(title=title),
name='detail'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<image_id>[^/]+)/update/$', re_path(r'^(?P<image_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'), views.UpdateView.as_view(), name='update'),
url(r'^(?P<image_id>[^/]+)/$', views.DetailView.as_view(), re_path(r'^(?P<image_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'), name='detail'),
] ]

View File

@ -16,13 +16,13 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.images.snapshots import views from openstack_dashboard.dashboards.project.images.snapshots import views
urlpatterns = [ urlpatterns = [
url(r'^(?P<instance_id>[^/]+)/create/$', re_path(r'^(?P<instance_id>[^/]+)/create/$',
views.CreateView.as_view(), views.CreateView.as_view(),
name='create') name='create')
] ]

View File

@ -17,7 +17,7 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -33,13 +33,13 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'):
title = _("Images") title = _("Images")
# New angular images # New angular images
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
url(r'', include((image_urls, 'images'))), re_path(r'', include((image_urls, 'images'))),
url(r'', include((snapshot_urls, 'snapshots'))), re_path(r'', include((snapshot_urls, 'snapshots'))),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'', include((image_urls, 'images'))), re_path(r'', include((image_urls, 'images'))),
url(r'', include((snapshot_urls, 'snapshots'))), re_path(r'', include((snapshot_urls, 'snapshots'))),
] ]

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.instances import views from openstack_dashboard.dashboards.project.instances import views
@ -25,36 +25,35 @@ INSTANCES = r'^(?P<instance_id>[^/]+)/%s$'
INSTANCES_KEYPAIR = r'^(?P<instance_id>[^/]+)/(?P<keypair_name>[^/]+)/%s$' INSTANCES_KEYPAIR = r'^(?P<instance_id>[^/]+)/(?P<keypair_name>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<instance_id>[^/]+)/$', re_path(r'^(?P<instance_id>[^/]+)/$',
views.DetailView.as_view(), name='detail'), views.DetailView.as_view(), name='detail'),
url(INSTANCES % 'update', views.UpdateView.as_view(), name='update'), re_path(INSTANCES % 'update', views.UpdateView.as_view(), name='update'),
url(INSTANCES % 'rebuild', views.RebuildView.as_view(), name='rebuild'), re_path(INSTANCES % 'rebuild', views.RebuildView.as_view(), name='rebuild'),
url(INSTANCES % 'serial', views.SerialConsoleView.as_view(), re_path(INSTANCES % 'serial', views.SerialConsoleView.as_view(),
name='serial'), name='serial'),
url(INSTANCES % 'console', views.console, name='console'), re_path(INSTANCES % 'console', views.console, name='console'),
url(INSTANCES % 'auto_console', views.auto_console, name='auto_console'), re_path(INSTANCES % 'auto_console',
url(INSTANCES % 'vnc', views.vnc, name='vnc'), views.auto_console, name='auto_console'),
url(INSTANCES % 'spice', views.spice, name='spice'), re_path(INSTANCES % 'vnc', views.vnc, name='vnc'),
url(INSTANCES % 'rdp', views.rdp, name='rdp'), re_path(INSTANCES % 'spice', views.spice, name='spice'),
url(INSTANCES % 'resize', views.ResizeView.as_view(), name='resize'), re_path(INSTANCES % 'rdp', views.rdp, name='rdp'),
url(INSTANCES_KEYPAIR % 'decryptpassword', re_path(INSTANCES % 'resize', views.ResizeView.as_view(), name='resize'),
views.DecryptPasswordView.as_view(), name='decryptpassword'), re_path(INSTANCES_KEYPAIR % 'decryptpassword',
url(INSTANCES % 'disassociate', views.DecryptPasswordView.as_view(), name='decryptpassword'),
views.DisassociateView.as_view(), name='disassociate'), re_path(INSTANCES % 'disassociate',
url(INSTANCES % 'attach_interface', views.DisassociateView.as_view(), name='disassociate'),
views.AttachInterfaceView.as_view(), name='attach_interface'), re_path(INSTANCES % 'attach_interface',
url(INSTANCES % 'detach_interface', views.AttachInterfaceView.as_view(), name='attach_interface'),
views.DetachInterfaceView.as_view(), name='detach_interface'), re_path(INSTANCES % 'detach_interface',
url(r'^(?P<instance_id>[^/]+)/attach_volume/$', views.DetachInterfaceView.as_view(), name='detach_interface'),
views.AttachVolumeView.as_view(), re_path(r'^(?P<instance_id>[^/]+)/attach_volume/$',
name='attach_volume' views.AttachVolumeView.as_view(),
), name='attach_volume'),
url(r'^(?P<instance_id>[^/]+)/detach_volume/$', re_path(r'^(?P<instance_id>[^/]+)/detach_volume/$',
views.DetachVolumeView.as_view(), views.DetachVolumeView.as_view(),
name='detach_volume' name='detach_volume'),
), re_path(r'^(?P<instance_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$',
url(r'^(?P<instance_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', views.UpdatePortView.as_view(), name='update_port'),
views.UpdatePortView.as_view(), name='update_port'), re_path(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'),
url(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'),
] ]

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers import views from horizon.browsers import views
@ -27,15 +27,16 @@ from openstack_dashboard.utils import settings as setting_utils
if setting_utils.get_dict_config('ANGULAR_FEATURES', 'key_pairs_panel'): if setting_utils.get_dict_config('ANGULAR_FEATURES', 'key_pairs_panel'):
title = _("Key Pairs") title = _("Key Pairs")
urlpatterns = [ urlpatterns = [
url('', views.AngularIndexView.as_view(title=title), name='index'), re_path('', views.AngularIndexView.as_view(title=title), name='index'),
url(r'^(?P<keypair_name>[^/]+)/$', re_path(r'^(?P<keypair_name>[^/]+)/$',
views.AngularIndexView.as_view(title=title), views.AngularIndexView.as_view(title=title),
name='detail'), name='detail'),
] ]
else: else:
urlpatterns = [ urlpatterns = [
url(r'^$', legacy_views.IndexView.as_view(), name='index'), re_path(r'^$', legacy_views.IndexView.as_view(), name='index'),
url(r'^import/$', legacy_views.ImportView.as_view(), name='import'), re_path(r'^import/$', legacy_views.ImportView.as_view(), name='import'),
url(r'^(?P<keypair_name>[^/]+)/$', legacy_views.DetailView.as_view(), re_path(r'^(?P<keypair_name>[^/]+)/$',
name='detail'), legacy_views.DetailView.as_view(),
name='detail'),
] ]

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers import views from horizon.browsers import views
@ -18,5 +18,5 @@ from horizon.browsers import views
title = _("Network QoS Policies") title = _("Network QoS Policies")
urlpatterns = [ urlpatterns = [
url(r'^$', views.AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', views.AngularIndexView.as_view(title=title), name='index'),
] ]

View File

@ -16,27 +16,29 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.network_topology import views from openstack_dashboard.dashboards.project.network_topology import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.NetworkTopologyView.as_view(), name='index'), re_path(r'^$', views.NetworkTopologyView.as_view(), name='index'),
url(r'^router$', views.RouterView.as_view(), name='router'), re_path(r'^router$', views.RouterView.as_view(), name='router'),
url(r'^network$', views.NetworkView.as_view(), name='network'), re_path(r'^network$', views.NetworkView.as_view(), name='network'),
url(r'^instance$', views.InstanceView.as_view(), name='instance'), re_path(r'^instance$', views.InstanceView.as_view(), name='instance'),
url(r'^router/(?P<router_id>[^/]+)/$', views.RouterDetailView.as_view(), re_path(r'^router/(?P<router_id>[^/]+)/$',
name='detail'), views.RouterDetailView.as_view(),
url(r'^router/(?P<router_id>[^/]+)/addinterface$', name='detail'),
views.NTAddInterfaceView.as_view(), name='interface'), re_path(r'^router/(?P<router_id>[^/]+)/addinterface$',
url(r'^network/(?P<network_id>[^/]+)/$', views.NetworkDetailView.as_view(), views.NTAddInterfaceView.as_view(), name='interface'),
name='detail'), re_path(r'^network/(?P<network_id>[^/]+)/$',
url(r'^network/(?P<network_id>[^/]+)/subnet/create$', views.NetworkDetailView.as_view(),
views.NTCreateSubnetView.as_view(), name='subnet'), name='detail'),
url(r'^json$', views.JSONView.as_view(), name='json'), re_path(r'^network/(?P<network_id>[^/]+)/subnet/create$',
url(r'^createnetwork$', views.NTCreateNetworkView.as_view(), views.NTCreateSubnetView.as_view(), name='subnet'),
name='createnetwork'), re_path(r'^json$', views.JSONView.as_view(), name='json'),
url(r'^createrouter$', views.NTCreateRouterView.as_view(), re_path(r'^createnetwork$', views.NTCreateNetworkView.as_view(),
name='createrouter'), name='createnetwork'),
re_path(r'^createrouter$', views.NTCreateRouterView.as_view(),
name='createrouter'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.networks.ports import views from openstack_dashboard.dashboards.project.networks.ports import views
from openstack_dashboard.dashboards.project.networks.ports.extensions. \ from openstack_dashboard.dashboards.project.networks.ports.extensions. \
@ -22,8 +22,8 @@ from openstack_dashboard.dashboards.project.networks.ports.extensions. \
PORTS = r'^(?P<port_id>[^/]+)/%s$' PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
url(PORTS % 'addallowedaddresspairs', re_path(PORTS % 'addallowedaddresspairs',
addr_pairs_views.AddAllowedAddressPair.as_view(), addr_pairs_views.AddAllowedAddressPair.as_view(),
name='addallowedaddresspairs') name='addallowedaddresspairs')
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.networks.subnets import views from openstack_dashboard.dashboards.project.networks.subnets import views
@ -20,5 +20,5 @@ from openstack_dashboard.dashboards.project.networks.subnets import views
SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$' SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'), re_path(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'),
] ]

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.networks.ports \ from openstack_dashboard.dashboards.project.networks.ports \
import urls as port_urls import urls as port_urls
@ -30,24 +30,24 @@ NETWORKS = r'^(?P<network_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateView.as_view(), name='create'), re_path(r'^create$', views.CreateView.as_view(), name='create'),
url(NETWORKS % r'detail(\?tab=network_tabs__overview)?$', re_path(NETWORKS % r'detail(\?tab=network_tabs__overview)?$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(NETWORKS % r'detail\?tab=network_tabs__ports_tab$', re_path(NETWORKS % r'detail\?tab=network_tabs__ports_tab$',
views.DetailView.as_view(), name='ports_tab'), views.DetailView.as_view(), name='ports_tab'),
url(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$', re_path(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$',
views.DetailView.as_view(), name='subnets_tab'), views.DetailView.as_view(), name='subnets_tab'),
url(NETWORKS % 'update', views.UpdateView.as_view(), name='update'), re_path(NETWORKS % 'update', views.UpdateView.as_view(), name='update'),
url(NETWORKS % 'subnets/create', subnet_views.CreateView.as_view(), re_path(NETWORKS % 'subnets/create', subnet_views.CreateView.as_view(),
name='createsubnet'), name='createsubnet'),
url(NETWORKS % 'ports/create', re_path(NETWORKS % 'ports/create',
port_views.CreateView.as_view(), name='addport'), port_views.CreateView.as_view(), name='addport'),
url(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$', re_path(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$',
subnet_views.UpdateView.as_view(), name='editsubnet'), subnet_views.UpdateView.as_view(), name='editsubnet'),
url(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', re_path(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$',
port_views.UpdateView.as_view(), name='editport'), port_views.UpdateView.as_view(), name='editport'),
url(r'^subnets/', include((subnet_urls, 'subnets'))), re_path(r'^subnets/', include((subnet_urls, 'subnets'))),
url(r'^ports/', include((port_urls, 'ports'))), re_path(r'^ports/', include((port_urls, 'ports'))),
] ]

View File

@ -16,12 +16,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.overview import views from openstack_dashboard.dashboards.project.overview import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.ProjectOverview.as_view(), name='index'), re_path(r'^$', views.ProjectOverview.as_view(), name='index'),
url(r'^warning$', views.WarningView.as_view(), name='warning'), re_path(r'^warning$', views.WarningView.as_view(), name='warning'),
] ]

View File

@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.routers.ports import views from openstack_dashboard.dashboards.project.routers.ports import views
PORTS = r'^(?P<port_id>[^/]+)/%s$' PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = [ urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.routers.extensions.extraroutes\ from openstack_dashboard.dashboards.project.routers.extensions.extraroutes\
import views as er_views import views as er_views
@ -25,21 +25,21 @@ ROUTER_URL = r'^(?P<router_id>[^/]+)/%s'
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(ROUTER_URL % '$', re_path(ROUTER_URL % '$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(ROUTER_URL % 'update', re_path(ROUTER_URL % 'update',
views.UpdateView.as_view(), views.UpdateView.as_view(),
name='update'), name='update'),
url(ROUTER_URL % 'addinterface', re_path(ROUTER_URL % 'addinterface',
port_views.AddInterfaceView.as_view(), port_views.AddInterfaceView.as_view(),
name='addinterface'), name='addinterface'),
url(ROUTER_URL % 'addrouterroute', re_path(ROUTER_URL % 'addrouterroute',
er_views.AddRouterRouteView.as_view(), er_views.AddRouterRouteView.as_view(),
name='addrouterroute'), name='addrouterroute'),
url(ROUTER_URL % 'setgateway', re_path(ROUTER_URL % 'setgateway',
port_views.SetGatewayView.as_view(), port_views.SetGatewayView.as_view(),
name='setgateway'), name='setgateway'),
] ]

View File

@ -16,20 +16,20 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.security_groups import views from openstack_dashboard.dashboards.project.security_groups import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<security_group_id>[^/]+)/$', re_path(r'^(?P<security_group_id>[^/]+)/$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<security_group_id>[^/]+)/add_rule/$', re_path(r'^(?P<security_group_id>[^/]+)/add_rule/$',
views.AddRuleView.as_view(), views.AddRuleView.as_view(),
name='add_rule'), name='add_rule'),
url(r'^(?P<security_group_id>[^/]+)/update/$', re_path(r'^(?P<security_group_id>[^/]+)/update/$',
views.UpdateView.as_view(), views.UpdateView.as_view(),
name='update') name='update')
] ]

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers import views from horizon.browsers import views
@ -18,5 +18,5 @@ from horizon.browsers import views
title = _("Server Groups") title = _("Server Groups")
urlpatterns = [ urlpatterns = [
url(r'^$', views.AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', views.AngularIndexView.as_view(title=title), name='index'),
] ]

View File

@ -10,17 +10,17 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.snapshots import views from openstack_dashboard.dashboards.project.snapshots import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.SnapshotsView.as_view(), name='index'), re_path(r'^$', views.SnapshotsView.as_view(), name='index'),
url(r'^(?P<snapshot_id>[^/]+)$', re_path(r'^(?P<snapshot_id>[^/]+)$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<snapshot_id>[^/]+)/update/$', re_path(r'^(?P<snapshot_id>[^/]+)/update/$',
views.UpdateView.as_view(), views.UpdateView.as_view(),
name='update'), name='update'),
] ]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from horizon.browsers.views import AngularIndexView from horizon.browsers.views import AngularIndexView
@ -20,7 +20,7 @@ from horizon.browsers.views import AngularIndexView
title = _("Trunks") title = _("Trunks")
urlpatterns = [ urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'), re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
url(r'^(?P<trunk_id>[^/]+)/$', AngularIndexView.as_view(title=title), re_path(r'^(?P<trunk_id>[^/]+)/$', AngularIndexView.as_view(title=title),
name='detail'), name='detail'),
] ]

View File

@ -10,16 +10,16 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.vg_snapshots import views from openstack_dashboard.dashboards.project.vg_snapshots import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<vg_snapshot_id>[^/]+)/detail/$', re_path(r'^(?P<vg_snapshot_id>[^/]+)/detail/$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<vg_snapshot_id>[^/]+)/create_group/$', re_path(r'^(?P<vg_snapshot_id>[^/]+)/create_group/$',
views.CreateGroupView.as_view(), views.CreateGroupView.as_view(),
name='create_group'), name='create_group'),
] ]

View File

@ -10,35 +10,35 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.volume_groups import views from openstack_dashboard.dashboards.project.volume_groups import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<group_id>[^/]+)$', re_path(r'^(?P<group_id>[^/]+)$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^create/$', re_path(r'^create/$',
views.CreateView.as_view(), views.CreateView.as_view(),
name='create'), name='create'),
url(r'^(?P<group_id>[^/]+)/update/$', re_path(r'^(?P<group_id>[^/]+)/update/$',
views.UpdateView.as_view(), views.UpdateView.as_view(),
name='update'), name='update'),
url(r'^(?P<group_id>[^/]+)/remove_volumese/$', re_path(r'^(?P<group_id>[^/]+)/remove_volumese/$',
views.RemoveVolumesView.as_view(), views.RemoveVolumesView.as_view(),
name='remove_volumes'), name='remove_volumes'),
url(r'^(?P<group_id>[^/]+)/delete/$', re_path(r'^(?P<group_id>[^/]+)/delete/$',
views.DeleteView.as_view(), views.DeleteView.as_view(),
name='delete'), name='delete'),
url(r'^(?P<group_id>[^/]+)/manage/$', re_path(r'^(?P<group_id>[^/]+)/manage/$',
views.ManageView.as_view(), views.ManageView.as_view(),
name='manage'), name='manage'),
url(r'^(?P<group_id>[^/]+)/create_snapshot/$', re_path(r'^(?P<group_id>[^/]+)/create_snapshot/$',
views.CreateSnapshotView.as_view(), views.CreateSnapshotView.as_view(),
name='create_snapshot'), name='create_snapshot'),
url(r'^(?P<group_id>[^/]+)/clone_group/$', re_path(r'^(?P<group_id>[^/]+)/clone_group/$',
views.CloneGroupView.as_view(), views.CloneGroupView.as_view(),
name='clone_group'), name='clone_group'),
] ]

View File

@ -12,58 +12,58 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.project.backups \ from openstack_dashboard.dashboards.project.backups \
import views as backup_views import views as backup_views
from openstack_dashboard.dashboards.project.volumes import views from openstack_dashboard.dashboards.project.volumes import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.VolumesView.as_view(), name='index'), re_path(r'^$', views.VolumesView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'), re_path(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<volume_id>[^/]+)/extend/$', re_path(r'^(?P<volume_id>[^/]+)/extend/$',
views.ExtendView.as_view(), views.ExtendView.as_view(),
name='extend'), name='extend'),
url(r'^(?P<volume_id>[^/]+)/attach/$', re_path(r'^(?P<volume_id>[^/]+)/attach/$',
views.EditAttachmentsView.as_view(), views.EditAttachmentsView.as_view(),
name='attach'), name='attach'),
url(r'^(?P<volume_id>[^/]+)/create_snapshot/$', re_path(r'^(?P<volume_id>[^/]+)/create_snapshot/$',
views.CreateSnapshotView.as_view(), views.CreateSnapshotView.as_view(),
name='create_snapshot'), name='create_snapshot'),
url(r'^(?P<volume_id>[^/]+)/create_transfer/$', re_path(r'^(?P<volume_id>[^/]+)/create_transfer/$',
views.CreateTransferView.as_view(), views.CreateTransferView.as_view(),
name='create_transfer'), name='create_transfer'),
url(r'^accept_transfer/$', re_path(r'^accept_transfer/$',
views.AcceptTransferView.as_view(), views.AcceptTransferView.as_view(),
name='accept_transfer'), name='accept_transfer'),
url(r'^(?P<transfer_id>[^/]+)/auth/(?P<auth_key>[^/]+)/$', re_path(r'^(?P<transfer_id>[^/]+)/auth/(?P<auth_key>[^/]+)/$',
views.ShowTransferView.as_view(), views.ShowTransferView.as_view(),
name='show_transfer'), name='show_transfer'),
url(r'^(?P<volume_id>[^/]+)/create_backup/$', re_path(r'^(?P<volume_id>[^/]+)/create_backup/$',
backup_views.CreateBackupView.as_view(), backup_views.CreateBackupView.as_view(),
name='create_backup'), name='create_backup'),
url(r'^(?P<volume_id>[^/]+)/create_backup/(?P<snapshot_id>[^/]+)$', re_path(r'^(?P<volume_id>[^/]+)/create_backup/(?P<snapshot_id>[^/]+)$',
backup_views.CreateBackupView.as_view(), backup_views.CreateBackupView.as_view(),
name='create_snapshot_backup'), name='create_snapshot_backup'),
url(r'^(?P<volume_id>[^/]+)/$', re_path(r'^(?P<volume_id>[^/]+)/$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='detail'), name='detail'),
url(r'^(?P<volume_id>[^/]+)/\?tab=volume_details__snapshots_tab$', re_path(r'^(?P<volume_id>[^/]+)/\?tab=volume_details__snapshots_tab$',
views.DetailView.as_view(), views.DetailView.as_view(),
name='snapshots_tab'), name='snapshots_tab'),
url(r'^(?P<volume_id>[^/]+)/upload_to_image/$', re_path(r'^(?P<volume_id>[^/]+)/upload_to_image/$',
views.UploadToImageView.as_view(), views.UploadToImageView.as_view(),
name='upload_to_image'), name='upload_to_image'),
url(r'^(?P<volume_id>[^/]+)/update/$', re_path(r'^(?P<volume_id>[^/]+)/update/$',
views.UpdateView.as_view(), views.UpdateView.as_view(),
name='update'), name='update'),
url(r'^(?P<volume_id>[^/]+)/retype/$', re_path(r'^(?P<volume_id>[^/]+)/retype/$',
views.RetypeView.as_view(), views.RetypeView.as_view(),
name='retype'), name='retype'),
url(r'^(?P<volume_id>[^/]+)/encryption_detail/$', re_path(r'^(?P<volume_id>[^/]+)/encryption_detail/$',
views.EncryptionDetailView.as_view(), views.EncryptionDetailView.as_view(),
name='encryption_detail'), name='encryption_detail'),
url(r'^(?P<transfer_id>[^/]+)/download_creds/(?P<auth_key>[^/]+)$', re_path(r'^(?P<transfer_id>[^/]+)/download_creds/(?P<auth_key>[^/]+)$',
views.DownloadTransferCreds.as_view(), views.DownloadTransferCreds.as_view(),
name='download_transfer_creds'), name='download_transfer_creds'),
] ]

View File

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.settings.password import views from openstack_dashboard.dashboards.settings.password import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.PasswordView.as_view(), name='index'), re_path(r'^$', views.PasswordView.as_view(), name='index'),
] ]

View File

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.dashboards.settings.user import views from openstack_dashboard.dashboards.settings.user import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.UserSettingsView.as_view(), name='index'), re_path(r'^$', views.UserSettingsView.as_view(), name='index'),
] ]

View File

@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from django.views import defaults from django.views import defaults
from openstack_dashboard.urls import urlpatterns from openstack_dashboard.urls import urlpatterns
urlpatterns.append(url(r'^500/$', defaults.server_error)) urlpatterns.append(re_path(r'^500/$', defaults.server_error))

View File

@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.urls import urlpatterns # noqa from openstack_dashboard.urls import urlpatterns # noqa
from openstack_dashboard import views from openstack_dashboard import views
urlpatterns.append(url(r'^header/', views.ExtensibleHeaderView.as_view())) urlpatterns.append(re_path(r'^header/', views.ExtensibleHeaderView.as_view()))

View File

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.test.test_panels.another_panel import views from openstack_dashboard.test.test_panels.another_panel import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.test.test_panels.nonloading_panel import views from openstack_dashboard.test.test_panels.nonloading_panel import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.test.test_panels.plugin_panel import views from openstack_dashboard.test.test_panels.plugin_panel import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf.urls import url from django.urls import re_path
from openstack_dashboard.test.test_panels.second_panel import views from openstack_dashboard.test.test_panels.second_panel import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
] ]

View File

@ -20,8 +20,8 @@ URL patterns for the OpenStack Dashboard.
from django.conf import settings from django.conf import settings
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls.static import static from django.conf.urls.static import static
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import re_path
from django.views import defaults from django.views import defaults
import horizon.base import horizon.base
@ -34,14 +34,14 @@ from openstack_dashboard import views
import horizon import horizon
urlpatterns = [ urlpatterns = [
url(r'^$', views.splash, name='splash'), re_path(r'^$', views.splash, name='splash'),
url(r'^auth/', include('openstack_auth.urls')), re_path(r'^auth/', include('openstack_auth.urls')),
url(r'^api/', include(rest.urls)), re_path(r'^api/', include(rest.urls)),
url(r'^jasmine/(.*?)$', jasmine.dispatcher), re_path(r'^jasmine/(.*?)$', jasmine.dispatcher),
url(r'', horizon.base._wrapped_include(horizon.urls)), re_path(r'', horizon.base._wrapped_include(horizon.urls)),
url(r'^ngdetails/', re_path(r'^ngdetails/',
browsers_views.AngularDetailsView.as_view(), browsers_views.AngularDetailsView.as_view(),
name='ngdetails'), name='ngdetails'),
] ]
# Development static app and project media serving using the staticfiles app. # Development static app and project media serving using the staticfiles app.
@ -53,4 +53,4 @@ urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG: if settings.DEBUG:
urlpatterns.append(url(r'^500/$', defaults.server_error)) urlpatterns.append(re_path(r'^500/$', defaults.server_error))

View File

@ -23,8 +23,8 @@ URL patterns for the OpenStack Dashboard.
from django.conf import settings from django.conf import settings
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls.static import static from django.conf.urls.static import static
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import re_path
from django.views import defaults from django.views import defaults
import horizon import horizon
@ -36,21 +36,21 @@ from openstack_dashboard.api import rest
from openstack_dashboard import views from openstack_dashboard import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.splash, name='splash'), re_path(r'^$', views.splash, name='splash'),
url(r'^api/', include(rest.urls)), re_path(r'^api/', include(rest.urls)),
url(r'^header/', views.ExtensibleHeaderView.as_view()), re_path(r'^header/', views.ExtensibleHeaderView.as_view()),
url(r'', horizon.base._wrapped_include(horizon.urls)), re_path(r'', horizon.base._wrapped_include(horizon.urls)),
] ]
# add URL for ngdetails # add URL for ngdetails
ngdetails_url = url(r'^ngdetails/', ngdetails_url = re_path(r'^ngdetails/',
browsers_views.AngularDetailsView.as_view(), browsers_views.AngularDetailsView.as_view(),
name='ngdetails') name='ngdetails')
urlpatterns.append(ngdetails_url) urlpatterns.append(ngdetails_url)
horizon.base._decorate_urlconf([ngdetails_url], require_auth) horizon.base._decorate_urlconf([ngdetails_url], require_auth)
for u in settings.AUTHENTICATION_URLS: for u in settings.AUTHENTICATION_URLS:
urlpatterns.append(url(r'^auth/', include(u))) urlpatterns.append(re_path(r'^auth/', include(u)))
# Development static app and project media serving using the staticfiles app. # Development static app and project media serving using the staticfiles app.
urlpatterns += staticfiles_urlpatterns() urlpatterns += staticfiles_urlpatterns()
@ -61,4 +61,4 @@ urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG: if settings.DEBUG:
urlpatterns.append(url(r'^500/$', defaults.server_error)) urlpatterns.append(re_path(r'^500/$', defaults.server_error))