Address RemovedInDjango40Warning

In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path(). For more info see [1]
These were already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
[2] https://review.opendev.org/c/openstack/horizon/+/827093

Change-Id: I6426fe8fe26b377b531c200e5bd5bcec5e686931
This commit is contained in:
manchandavishal 2022-04-29 16:41:05 +05:30
parent 84e5380a31
commit cb5ca26b17
7 changed files with 38 additions and 29 deletions

View File

@ -11,12 +11,13 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from tacker_horizon.openstack_dashboard.dashboards.nfv.nscatalog import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^onboardns', views.OnBoardNSView.as_view(), name='onboardns'),
url(r'^(?P<nsd_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^onboardns', views.OnBoardNSView.as_view(), name='onboardns'),
re_path(r'^(?P<nsd_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
]

View File

@ -11,12 +11,13 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from tacker_horizon.openstack_dashboard.dashboards.nfv.nsmanager import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^deployns$', views.DeployNSView.as_view(), name='deployns'),
url(r'^(?P<ns_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^deployns$', views.DeployNSView.as_view(), name='deployns'),
re_path(r'^(?P<ns_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
]

View File

@ -13,12 +13,14 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from tacker_horizon.openstack_dashboard.dashboards.nfv.vim import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^registervim$', views.RegisterVIMView.as_view(), name='registervim'),
url(r'^(?P<vim_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^registervim$', views.RegisterVIMView.as_view(),
name='registervim'),
re_path(r'^(?P<vim_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
]

View File

@ -13,12 +13,13 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^onboardvnf', views.OnBoardVNFView.as_view(), name='onboardvnf'),
url(r'^(?P<vnfd_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^onboardvnf', views.OnBoardVNFView.as_view(), name='onboardvnf'),
re_path(r'^(?P<vnfd_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
]

View File

@ -11,14 +11,15 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgcatalog \
import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^onboardvnffg', views.OnBoardVNFFGView.as_view(),
name='onboardvnffg'),
url(r'^(?P<vnffgd_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^onboardvnffg', views.OnBoardVNFFGView.as_view(),
name='onboardvnffg'),
re_path(r'^(?P<vnffgd_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
]

View File

@ -11,13 +11,15 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgmanager \
import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^deployvnffg$', views.DeployVNFFGView.as_view(), name='deployvnffg'),
url(r'^(?P<vnffg_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^deployvnffg$', views.DeployVNFFGView.as_view(),
name='deployvnffg'),
re_path(r'^(?P<vnffg_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
]

View File

@ -13,12 +13,13 @@
# under the License.
from django.conf.urls import url
from django.urls import re_path
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^deployvnf$', views.DeployVNFView.as_view(), name='deployvnf'),
url(r'^(?P<vnf_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
re_path(r'^$', views.IndexView.as_view(), name='index'),
re_path(r'^deployvnf$', views.DeployVNFView.as_view(), name='deployvnf'),
re_path(r'^(?P<vnf_id>[^/]+)/$', views.DetailView.as_view(),
name='detail'),
]