Merge "Address RemovedInDjango40Warning (3)"

This commit is contained in:
Zuul 2022-03-10 12:23:11 +00:00 committed by Gerrit Code Review
commit cf9a30d39e
89 changed files with 725 additions and 710 deletions

View File

@ -458,13 +458,13 @@ URLs
----
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
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
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
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
]
views.py

View File

@ -176,15 +176,15 @@ the ``mypanel`` directory and add the following as a new url pattern::
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
urlpatterns = [
url(r'^$',
re_path(r'^$',
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(),
name='create_snapshot'),
]

View File

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

View File

@ -10,11 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from {{ dash_path }}.{{ panel_name }} import views
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.urls import include
from django.conf.urls import url
from django.urls import re_path
from django.utils import timezone
from django.views.decorators.http import last_modified
from django.views.generic import TemplateView
@ -28,28 +28,28 @@ from horizon.test.jasmine import jasmine
from horizon import views
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()
# Client-side i18n URLconf.
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)(
i18n.JavaScriptCatalog.as_view()),
name='jsi18n'),
url(r'^i18n/setlang/$',
re_path(r'^i18n/setlang/$',
i18n.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:
urlpatterns.extend([
url(r'^jasmine-legacy/$',
re_path(r'^jasmine-legacy/$',
TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"),
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
# 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
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
# 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
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
# 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 TwoTabsView
urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'),
url(r'^tabs/$', TwoTabsView.as_view(), name='tabs'),
re_path(r'^$', IndexView.as_view(), name='index'),
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 url
from django.contrib.auth import views
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import re_path
from django.views.generic import TemplateView
import horizon
@ -32,13 +32,13 @@ from horizon.test.jasmine import jasmine
urlpatterns = [
url(r'', horizon.base._wrapped_include(horizon.urls)),
url(r"auth/login/",
re_path(r'', horizon.base._wrapped_include(horizon.urls)),
re_path(r"auth/login/",
views.LoginView.as_view(template_name="auth/login.html"),
name='login'),
url(r'auth/', include('django.contrib.auth.urls')),
url(r'^jasmine/.*?$', jasmine.dispatcher),
url(r'^jasmine-legacy/$',
re_path(r'auth/', include('django.contrib.auth.urls')),
re_path(r'^jasmine/.*?$', jasmine.dispatcher),
re_path(r'^jasmine-legacy/$',
TemplateView.as_view(
template_name="horizon/jasmine/jasmine_legacy.html"),
name='jasmine_tests'),

View File

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

View File

@ -12,7 +12,7 @@
# limitations under the License.
from django.conf import settings
from django.conf.urls import url
from django.urls import re_path
from django.views import generic
from openstack_auth import utils
@ -20,30 +20,31 @@ from openstack_auth import views
urlpatterns = [
url(r"^login/$", views.login, name='login'),
url(r"^logout/$", views.logout, name='logout'),
url(r'^switch/(?P<tenant_id>[^/]+)/$', views.switch,
re_path(r"^login/$", views.login, name='login'),
re_path(r"^logout/$", views.logout, name='logout'),
re_path(r'^switch/(?P<tenant_id>[^/]+)/$', views.switch,
name='switch_tenants'),
url(r'^switch_services_region/(?P<region_name>[^/]+)/$',
re_path(r'^switch_services_region/(?P<region_name>[^/]+)/$',
views.switch_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,
name='switch_keystone_provider'),
url(r'^switch_system_scope/$',
re_path(r'^switch_system_scope/$',
views.switch_system_scope,
name='switch_system_scope'),
]
if utils.allow_expired_passowrd_change():
urlpatterns.append(
url(r'^password/(?P<user_id>[^/]+)/$', views.PasswordView.as_view(),
re_path(r'^password/(?P<user_id>[^/]+)/$',
views.PasswordView.as_view(),
name='password')
)
if settings.WEBSSO_ENABLED:
urlpatterns += [
url(r"^websso/$", views.websso, name='websso'),
url(r"^error/$",
re_path(r"^websso/$", views.websso, name='websso'),
re_path(r"^error/$",
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.
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf import urls
from django.urls import re_path
urlpatterns = []
@ -27,6 +28,6 @@ def register(view):
as_view() method. The url_regex attribute of the view should be a standard
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)
return view

View File

@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# 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
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.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.contrib.developer.profiler import views
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from horizon.browsers.views import AngularIndexView
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
# 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
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.admin.aggregates \
import views
urlpatterns = [
url(r'^$',
re_path(r'^$',
views.IndexView.as_view(), name='index'),
url(r'^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'),
url(r'^(?P<id>[^/]+)/manage_hosts/$',
re_path(r'^(?P<id>[^/]+)/manage_hosts/$',
views.ManageHostsView.as_view(), name='manage_hosts'),
]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# 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.extensions. \
@ -22,8 +22,8 @@ PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
url(PORTS % 'addallowedaddresspairs',
re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
re_path(PORTS % 'addallowedaddresspairs',
addr_pairs_views.AddAllowedAddressPair.as_view(),
name='addallowedaddresspairs'),
]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.admin.networks.subnets import views
@ -21,5 +21,5 @@ SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$'
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.
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 \
import views as agent_views
@ -32,27 +32,27 @@ NETWORKS = r'^(?P<network_id>[^/]+)/%s$'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(NETWORKS % 'update', views.UpdateView.as_view(), name='update'),
url(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'),
url(NETWORKS % r'detail\?tab=network_tabs__ports_tab$',
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^create/$', views.CreateView.as_view(), name='create'),
re_path(NETWORKS % 'update', views.UpdateView.as_view(), name='update'),
re_path(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'),
re_path(NETWORKS % r'detail\?tab=network_tabs__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'),
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'),
url(NETWORKS % 'agents/add',
re_path(NETWORKS % 'agents/add',
agent_views.AddView.as_view(), name='adddhcpagent'),
url(NETWORKS % 'subnets/create',
re_path(NETWORKS % 'subnets/create',
subnet_views.CreateView.as_view(), name='createsubnet'),
url(NETWORKS % 'ports/create',
re_path(NETWORKS % 'ports/create',
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'),
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'),
url(r'^subnets/', include((subnet_urls, 'subnets'))),
url(r'^ports/', include((port_urls, 'ports'))),
re_path(r'^subnets/', include((subnet_urls, 'subnets'))),
re_path(r'^ports/', include((port_urls, 'ports'))),
]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,13 +10,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.admin.volume_types.extras \
import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^create/$', views.CreateView.as_view(), name='create'),
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.admin.volume_types.qos_specs \
import views
urlpatterns = [
url(r'^(?P<qos_spec_id>[^/]+)/create/$',
re_path(r'^(?P<qos_spec_id>[^/]+)/create/$',
views.CreateKeyValuePairView.as_view(), name='create'),
url(r'^(?P<qos_spec_id>[^/]+)/$', views.IndexView.as_view(), name='index'),
url(r'^(?P<qos_spec_id>[^/]+)/key/(?P<key>[^/]+)/edit/$',
re_path(r'^(?P<qos_spec_id>[^/]+)/$',
views.IndexView.as_view(), name='index'),
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.
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 \
import urls as extras_urls
@ -22,33 +22,33 @@ from openstack_dashboard.dashboards.admin.volume_types \
urlpatterns = [
url(r'^$', views.VolumeTypesView.as_view(), name='index'),
url(r'^create_type$', views.CreateVolumeTypeView.as_view(),
re_path(r'^$', views.VolumeTypesView.as_view(), name='index'),
re_path(r'^create_type$', views.CreateVolumeTypeView.as_view(),
name='create_type'),
url(r'^(?P<type_id>[^/]+)/update_type/$',
re_path(r'^(?P<type_id>[^/]+)/update_type/$',
views.EditVolumeTypeView.as_view(),
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'),
url(r'^(?P<type_id>[^/]+)/manage_qos_spec_association/$',
re_path(r'^(?P<type_id>[^/]+)/manage_qos_spec_association/$',
views.ManageQosSpecAssociationView.as_view(),
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(),
name='edit_qos_spec_consumer'),
url(r'^(?P<type_id>[^/]+)/extras/',
re_path(r'^(?P<type_id>[^/]+)/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(),
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(),
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(),
name='type_encryption_detail'),
url(r'^qos_specs/',
re_path(r'^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'),
]

View File

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

View File

@ -13,23 +13,23 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.identity.application_credentials \
import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<application_credential_id>[^/]+)/detail/$',
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^create/$', views.CreateView.as_view(), name='create'),
re_path(r'^(?P<application_credential_id>[^/]+)/detail/$',
views.DetailView.as_view(), name='detail'),
url(r'^success/$',
re_path(r'^success/$',
views.CreateSuccessfulView.as_view(), name='success'),
url(r'^download_openrc/$',
re_path(r'^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'),
url(r'^download_clouds_yaml/$',
re_path(r'^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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from django.utils.translation import gettext_lazy as _
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'):
title = _("Domains")
urlpatterns = [
url('', views.AngularIndexView.as_view(title=title), name='index'),
re_path('', views.AngularIndexView.as_view(title=title), name='index'),
]
else:
urlpatterns = [
url(r'^$', legacyView.IndexView.as_view(), name='index'),
url(r'^create$', legacyView.CreateDomainView.as_view(), name='create'),
url(r'^(?P<domain_id>[^/]+)/update/$',
re_path(r'^$', legacyView.IndexView.as_view(), name='index'),
re_path(r'^create$',
legacyView.CreateDomainView.as_view(), name='create'),
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
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'):
title = panel.Groups.name
urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'),
re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
]
else:
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateView.as_view(), name='create'),
url(r'^(?P<group_id>[^/]+)/update/$',
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^create$', views.CreateView.as_view(), name='create'),
re_path(r'^(?P<group_id>[^/]+)/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'),
url(r'^(?P<group_id>[^/]+)/add_members/$',
re_path(r'^(?P<group_id>[^/]+)/add_members/$',
views.NonMembersView.as_view(), name='add_members'),
]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.identity.identity_providers.protocols \
import views
@ -20,5 +20,5 @@ from openstack_dashboard.dashboards.identity.identity_providers.protocols \
PORTS = r'^(?P<protocol_id>[^/]+)/%s$'
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.
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 \
import urls as protocol_urls
@ -21,16 +21,16 @@ from openstack_dashboard.dashboards.identity.identity_providers \
import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<identity_provider_id>[^/]+)/detail/$',
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^(?P<identity_provider_id>[^/]+)/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$',
views.DetailView.as_view(),
name='protocols_tab'),
url(r'^(?P<identity_provider_id>[^/]+)/update/$',
re_path(r'^(?P<identity_provider_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'),
url(r'^register/$', views.RegisterView.as_view(), name='register'),
url(r'(?P<identity_provider_id>[^/]+)/protocols/',
re_path(r'^register/$', views.RegisterView.as_view(), name='register'),
re_path(r'(?P<identity_provider_id>[^/]+)/protocols/',
include((protocol_urls, 'protocols'))),
]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,12 +16,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.project.floating_ips import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^associate/$', views.AssociateView.as_view(), name='associate'),
url(r'^allocate/$', views.AllocateView.as_view(), name='allocate'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^associate/$', views.AssociateView.as_view(), name='associate'),
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from django.utils.translation import gettext_lazy as _
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'):
title = _("Images")
urlpatterns = [
url(r'^(?P<image_id>[^/]+)/$', AngularIndexView.as_view(title=title),
re_path(r'^(?P<image_id>[^/]+)/$',
AngularIndexView.as_view(title=title),
name='detail'),
]
else:
urlpatterns = [
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<image_id>[^/]+)/update/$',
re_path(r'^create/$', views.CreateView.as_view(), name='create'),
re_path(r'^(?P<image_id>[^/]+)/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'),
]

View File

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

View File

@ -17,7 +17,7 @@
# under the License.
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 horizon.browsers.views import AngularIndexView
@ -33,13 +33,13 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'):
title = _("Images")
# New angular images
urlpatterns = [
url(r'^$', AngularIndexView.as_view(title=title), name='index'),
url(r'', include((image_urls, 'images'))),
url(r'', include((snapshot_urls, 'snapshots'))),
re_path(r'^$', AngularIndexView.as_view(title=title), name='index'),
re_path(r'', include((image_urls, 'images'))),
re_path(r'', include((snapshot_urls, 'snapshots'))),
]
else:
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'', include((image_urls, 'images'))),
url(r'', include((snapshot_urls, 'snapshots'))),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'', include((image_urls, 'images'))),
re_path(r'', include((snapshot_urls, 'snapshots'))),
]

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from django.utils.translation import gettext_lazy as _
from horizon.browsers import views
@ -18,5 +18,5 @@ from horizon.browsers import views
title = _("Network QoS Policies")
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.project.network_topology import views
urlpatterns = [
url(r'^$', views.NetworkTopologyView.as_view(), name='index'),
url(r'^router$', views.RouterView.as_view(), name='router'),
url(r'^network$', views.NetworkView.as_view(), name='network'),
url(r'^instance$', views.InstanceView.as_view(), name='instance'),
url(r'^router/(?P<router_id>[^/]+)/$', views.RouterDetailView.as_view(),
re_path(r'^$', views.NetworkTopologyView.as_view(), name='index'),
re_path(r'^router$', views.RouterView.as_view(), name='router'),
re_path(r'^network$', views.NetworkView.as_view(), name='network'),
re_path(r'^instance$', views.InstanceView.as_view(), name='instance'),
re_path(r'^router/(?P<router_id>[^/]+)/$',
views.RouterDetailView.as_view(),
name='detail'),
url(r'^router/(?P<router_id>[^/]+)/addinterface$',
re_path(r'^router/(?P<router_id>[^/]+)/addinterface$',
views.NTAddInterfaceView.as_view(), name='interface'),
url(r'^network/(?P<network_id>[^/]+)/$', views.NetworkDetailView.as_view(),
re_path(r'^network/(?P<network_id>[^/]+)/$',
views.NetworkDetailView.as_view(),
name='detail'),
url(r'^network/(?P<network_id>[^/]+)/subnet/create$',
re_path(r'^network/(?P<network_id>[^/]+)/subnet/create$',
views.NTCreateSubnetView.as_view(), name='subnet'),
url(r'^json$', views.JSONView.as_view(), name='json'),
url(r'^createnetwork$', views.NTCreateNetworkView.as_view(),
re_path(r'^json$', views.JSONView.as_view(), name='json'),
re_path(r'^createnetwork$', views.NTCreateNetworkView.as_view(),
name='createnetwork'),
url(r'^createrouter$', views.NTCreateRouterView.as_view(),
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
# 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.extensions. \
@ -22,8 +22,8 @@ from openstack_dashboard.dashboards.project.networks.ports.extensions. \
PORTS = r'^(?P<port_id>[^/]+)/%s$'
urlpatterns = [
url(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
url(PORTS % 'addallowedaddresspairs',
re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'),
re_path(PORTS % 'addallowedaddresspairs',
addr_pairs_views.AddAllowedAddressPair.as_view(),
name='addallowedaddresspairs')
]

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
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$'
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.
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 \
import urls as port_urls
@ -30,24 +30,24 @@ NETWORKS = r'^(?P<network_id>[^/]+)/%s$'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create$', views.CreateView.as_view(), name='create'),
url(NETWORKS % r'detail(\?tab=network_tabs__overview)?$',
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^create$', views.CreateView.as_view(), name='create'),
re_path(NETWORKS % r'detail(\?tab=network_tabs__overview)?$',
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'),
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'),
url(NETWORKS % 'update', views.UpdateView.as_view(), name='update'),
url(NETWORKS % 'subnets/create', subnet_views.CreateView.as_view(),
re_path(NETWORKS % 'update', views.UpdateView.as_view(), name='update'),
re_path(NETWORKS % 'subnets/create', subnet_views.CreateView.as_view(),
name='createsubnet'),
url(NETWORKS % 'ports/create',
re_path(NETWORKS % 'ports/create',
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'),
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'),
url(r'^subnets/', include((subnet_urls, 'subnets'))),
url(r'^ports/', include((port_urls, 'ports'))),
re_path(r'^subnets/', include((subnet_urls, 'subnets'))),
re_path(r'^ports/', include((port_urls, 'ports'))),
]

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from django.utils.translation import gettext_lazy as _
from horizon.browsers import views
@ -18,5 +18,5 @@ from horizon.browsers import views
title = _("Server Groups")
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.project.snapshots import views
urlpatterns = [
url(r'^$', views.SnapshotsView.as_view(), name='index'),
url(r'^(?P<snapshot_id>[^/]+)$',
re_path(r'^$', views.SnapshotsView.as_view(), name='index'),
re_path(r'^(?P<snapshot_id>[^/]+)$',
views.DetailView.as_view(),
name='detail'),
url(r'^(?P<snapshot_id>[^/]+)/update/$',
re_path(r'^(?P<snapshot_id>[^/]+)/update/$',
views.UpdateView.as_view(),
name='update'),
]

View File

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

View File

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

View File

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

View File

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

View File

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.settings.password import views
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from openstack_dashboard.dashboards.settings.user import views
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
# under the License.
from django.conf.urls import url
from django.urls import re_path
from django.views import defaults
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
# 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 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
# 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
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
# 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
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
# 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
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
# 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
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.urls import include
from django.conf.urls.static import static
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import re_path
from django.views import defaults
import horizon.base
@ -34,12 +34,12 @@ from openstack_dashboard import views
import horizon
urlpatterns = [
url(r'^$', views.splash, name='splash'),
url(r'^auth/', include('openstack_auth.urls')),
url(r'^api/', include(rest.urls)),
url(r'^jasmine/(.*?)$', jasmine.dispatcher),
url(r'', horizon.base._wrapped_include(horizon.urls)),
url(r'^ngdetails/',
re_path(r'^$', views.splash, name='splash'),
re_path(r'^auth/', include('openstack_auth.urls')),
re_path(r'^api/', include(rest.urls)),
re_path(r'^jasmine/(.*?)$', jasmine.dispatcher),
re_path(r'', horizon.base._wrapped_include(horizon.urls)),
re_path(r'^ngdetails/',
browsers_views.AngularDetailsView.as_view(),
name='ngdetails'),
]
@ -53,4 +53,4 @@ urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
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.urls import include
from django.conf.urls.static import static
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import re_path
from django.views import defaults
import horizon
@ -36,21 +36,21 @@ from openstack_dashboard.api import rest
from openstack_dashboard import views
urlpatterns = [
url(r'^$', views.splash, name='splash'),
url(r'^api/', include(rest.urls)),
url(r'^header/', views.ExtensibleHeaderView.as_view()),
url(r'', horizon.base._wrapped_include(horizon.urls)),
re_path(r'^$', views.splash, name='splash'),
re_path(r'^api/', include(rest.urls)),
re_path(r'^header/', views.ExtensibleHeaderView.as_view()),
re_path(r'', horizon.base._wrapped_include(horizon.urls)),
]
# add URL for ngdetails
ngdetails_url = url(r'^ngdetails/',
ngdetails_url = re_path(r'^ngdetails/',
browsers_views.AngularDetailsView.as_view(),
name='ngdetails')
urlpatterns.append(ngdetails_url)
horizon.base._decorate_urlconf([ngdetails_url], require_auth)
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.
urlpatterns += staticfiles_urlpatterns()
@ -61,4 +61,4 @@ urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG:
urlpatterns.append(url(r'^500/$', defaults.server_error))
urlpatterns.append(re_path(r'^500/$', defaults.server_error))