Browse Source

Merge "Remove patterns call from urls"

Jenkins 1 year ago
parent
commit
f14de1c22a

+ 2
- 4
gbpui/panels/application_policy/urls.py View File

@@ -11,13 +11,11 @@
11 11
 # under the License.
12 12
 
13 13
 
14
-from django.conf.urls import patterns  # noqa
15 14
 from django.conf.urls import url  # noqa
16 15
 
17 16
 import views
18 17
 
19
-urlpatterns = patterns(
20
-    '',
18
+urlpatterns = [
21 19
     url(r'^$', views.IndexView.as_view(), name='index'),
22 20
     url(r'^addpolicy_rule_set$', views.AddPolicyRuleSetView.as_view(),
23 21
         name='addpolicy_rule_set'),
@@ -48,4 +46,4 @@ urlpatterns = patterns(
48 46
     url(r'^policy_rule_set/(?P<policy_rule_set_id>[^/]+)/$',
49 47
         views.PolicyRuleSetDetailsView.as_view(),
50 48
         name='policy_rule_set_details'),
51
-)
49
+]

+ 53
- 62
gbpui/panels/network_policy/urls.py View File

@@ -11,69 +11,60 @@
11 11
 #    under the License.
12 12
 
13 13
 
14
-from django.conf.urls import patterns  # noqa
15 14
 from django.conf.urls import url  # noqa
16 15
 
17 16
 import views
18 17
 
19
-urlpatterns = patterns('',
20
-                   url(r'^$', views.IndexView.as_view(), name='index'),
21
-                   url(r'^addl3policy$',
22
-                       views.AddL3policyView.as_view(),
23
-                          name='addl3policy'),
24
-                   url(r'^addservicepolicy$',
25
-                          views.CreateServicePolicyView.as_view(),
26
-                       name='create_servicepolicy'),
27
-                   url(r'^addexternalsegmentparam$',
28
-                          views.AddExternalSegmentParamView.as_view(),
29
-                       name='add_external_segment_param'),
30
-                   url(r'^addnetworkserviceparam$',
31
-                          views.AddNetworkServiceParamView.as_view(),
32
-                       name='add_network_service_param'),
33
-                   url(r'^addexternalrouteparam$',
34
-                          views.AddExternalRouteParamView.as_view(),
35
-                       name='add_external_route_param'),
36
-                   url(r'^createexternalconnectivity$',
37
-                          views.CreateExternalConnectivityView.as_view(),
38
-                       name='create_external_connectivity'),
39
-                   url(r'^createnatpool$',
40
-                          views.CreateNATPoolView.as_view(),
41
-                       name='create_nat_pool'),
42
-                   url(r'^update_servicepolicy/(?P<service_policy_id>[^/]+)/$',
43
-                       views.UpdateServicePolicyView.as_view(),
44
-                       name='update_service_policy'),
45
-                   url(r'^update_externalconnectivity/'
46
-                       '(?P<external_connectivity_id>[^/]+)/$',
47
-                       views.UpdateExternalConnectivityView.as_view(),
48
-                       name='update_externalconnectivity'),
49
-                   url(r'^update_natpool/'
50
-                       '(?P<nat_pool_id>[^/]+)/$',
51
-                       views.UpdateNATPoolView.as_view(),
52
-                       name='update_natpool'),
53
-                   url(r'^natpool/'
54
-                       '(?P<nat_pool_id>[^/]+)/$',
55
-                       views.NATPoolDetailsView.as_view(),
56
-                       name='nat_pool_details'),
57
-                   url(r'^servicepolicy/(?P<service_policy_id>[^/]+)/$',
58
-                       views.ServicePolicyDetailsView.as_view(),
59
-                       name='service_policy_details'),
60
-                   url(r'^externalconnectivity/'
61
-                       '(?P<external_connectivity_id>[^/]+)/$',
62
-                       views.ExternalConnectivityDetailsView.as_view(),
63
-                       name='external_connectivity_details'),
64
-                   url(r'^addl2policy$',
65
-                       views.AddL2policyView.as_view(),
66
-                                               name='addl2policy'),
67
-                   url(r'^l3policy_details/(?P<l3policy_id>[^/]+)/$',
68
-                       views.L3PolicyDetailsView.as_view(),
69
-                                               name='l3policy_details'),
70
-                   url(r'^l3policy_update/(?P<l3policy_id>[^/]+)/$',
71
-                       views.L3PolicyUpdateView.as_view(),
72
-                                               name='update_l3policy'),
73
-                   url(r'^l2policy_details/(?P<l2policy_id>[^/]+)/$',
74
-                       views.L2PolicyDetailsView.as_view(),
75
-                                               name='l2policy_details'),
76
-                   url(r'^l2policy_update/(?P<l2policy_id>[^/]+)/$',
77
-                       views.L2PolicyUpdateView.as_view(),
78
-                                               name='update_l2policy'),
79
-                       )
18
+urlpatterns = [
19
+    url(r'^$', views.IndexView.as_view(), name='index'),
20
+    url(r'^addl3policy$', views.AddL3policyView.as_view(), name='addl3policy'),
21
+    url(r'^addservicepolicy$',
22
+        views.CreateServicePolicyView.as_view(),
23
+        name='create_servicepolicy'),
24
+    url(r'^addexternalsegmentparam$',
25
+        views.AddExternalSegmentParamView.as_view(),
26
+        name='add_external_segment_param'),
27
+    url(r'^addnetworkserviceparam$',
28
+        views.AddNetworkServiceParamView.as_view(),
29
+        name='add_network_service_param'),
30
+    url(r'^addexternalrouteparam$',
31
+        views.AddExternalRouteParamView.as_view(),
32
+        name='add_external_route_param'),
33
+    url(r'^createexternalconnectivity$',
34
+        views.CreateExternalConnectivityView.as_view(),
35
+        name='create_external_connectivity'),
36
+    url(r'^createnatpool$',
37
+        views.CreateNATPoolView.as_view(),
38
+        name='create_nat_pool'),
39
+    url(r'^update_servicepolicy/(?P<service_policy_id>[^/]+)/$',
40
+        views.UpdateServicePolicyView.as_view(),
41
+        name='update_service_policy'),
42
+    url(r'^update_externalconnectivity/(?P<external_connectivity_id>[^/]+)/$',
43
+        views.UpdateExternalConnectivityView.as_view(),
44
+        name='update_externalconnectivity'),
45
+    url(r'^update_natpool/(?P<nat_pool_id>[^/]+)/$',
46
+        views.UpdateNATPoolView.as_view(),
47
+        name='update_natpool'),
48
+    url(r'^natpool/(?P<nat_pool_id>[^/]+)/$',
49
+        views.NATPoolDetailsView.as_view(),
50
+        name='nat_pool_details'),
51
+    url(r'^servicepolicy/(?P<service_policy_id>[^/]+)/$',
52
+        views.ServicePolicyDetailsView.as_view(),
53
+        name='service_policy_details'),
54
+    url(r'^externalconnectivity/(?P<external_connectivity_id>[^/]+)/$',
55
+        views.ExternalConnectivityDetailsView.as_view(),
56
+        name='external_connectivity_details'),
57
+    url(r'^addl2policy$', views.AddL2policyView.as_view(), name='addl2policy'),
58
+    url(r'^l3policy_details/(?P<l3policy_id>[^/]+)/$',
59
+        views.L3PolicyDetailsView.as_view(),
60
+        name='l3policy_details'),
61
+    url(r'^l3policy_update/(?P<l3policy_id>[^/]+)/$',
62
+        views.L3PolicyUpdateView.as_view(),
63
+        name='update_l3policy'),
64
+    url(r'^l2policy_details/(?P<l2policy_id>[^/]+)/$',
65
+        views.L2PolicyDetailsView.as_view(),
66
+        name='l2policy_details'),
67
+    url(r'^l2policy_update/(?P<l2policy_id>[^/]+)/$',
68
+        views.L2PolicyUpdateView.as_view(),
69
+        name='update_l2policy'),
70
+]

+ 36
- 37
gbpui/panels/network_services/urls.py View File

@@ -11,44 +11,43 @@
11 11
 #    under the License.
12 12
 
13 13
 
14
-from django.conf.urls import patterns  # noqa
15 14
 from django.conf.urls import url  # noqa
16 15
 
17 16
 import views
18 17
 
19
-urlpatterns = patterns('',
20
-                       url(r'^$', views.IndexView.as_view(), name='index'),
21
-                       url(r'^create_service_profile$',
22
-                           views.CreateServiceProfileView.as_view(),
23
-                           name='create_service_profile'),
24
-                       url(r'^serviceprofile/(?P<sp_id>[^/]+)/$',
25
-                           views.ServiceProfileDetailsView.as_view(),
26
-                           name='service_profile_details'),
27
-                       url(r'^create_sc_node$',
28
-                           views.CreateServiceChainNodeView.as_view(),
29
-                           name='create_sc_node'),
30
-                       url(r'^update_sc_node/(?P<scnode_id>[^/]+)/$',
31
-                           views.UpdateServiceChainNodeView.as_view(),
32
-                           name='update_sc_node'),
33
-                       url(r'^sc_node/(?P<scnode_id>[^/]+)/$',
34
-                           views.ServiceChainNodeDetailsView.as_view(),
35
-                           name='sc_node_details'),
36
-                       url(r'^create_sc_spec$',
37
-                           views.CreateServiceChainSpecView.as_view(),
38
-                           name='create_sc_spec'),
39
-                       url(r'^update_sc_spec/(?P<scspec_id>[^/]+)/$',
40
-                           views.UpdateServiceChainSpecView.as_view(),
41
-                           name='update_sc_spec'),
42
-                       url(r'^sc_spec/(?P<scspec_id>[^/]+)/$',
43
-                           views.ServiceChainSpecDetailsView.as_view(),
44
-                           name='sc_spec_details'),
45
-                       url(r'^create_sc_instance$',
46
-                           views.CreateServiceChainInstanceView.as_view(),
47
-                           name='create_sc_instance'),
48
-                       url(r'^update_sc_instance/(?P<scinstance_id>[^/]+)/$',
49
-                           views.UpdateServiceChainInstanceView.as_view(),
50
-                           name='update_sc_instance'),
51
-                       url(r'^sc_instance/(?P<scinstance_id>[^/]+)/$',
52
-                           views.ServiceChainInstanceDetailsView.as_view(),
53
-                           name='sc_instance_details'),
54
-                       )
18
+urlpatterns = [
19
+    url(r'^$', views.IndexView.as_view(), name='index'),
20
+    url(r'^create_service_profile$',
21
+        views.CreateServiceProfileView.as_view(),
22
+        name='create_service_profile'),
23
+    url(r'^serviceprofile/(?P<sp_id>[^/]+)/$',
24
+        views.ServiceProfileDetailsView.as_view(),
25
+        name='service_profile_details'),
26
+    url(r'^create_sc_node$',
27
+        views.CreateServiceChainNodeView.as_view(),
28
+        name='create_sc_node'),
29
+    url(r'^update_sc_node/(?P<scnode_id>[^/]+)/$',
30
+        views.UpdateServiceChainNodeView.as_view(),
31
+        name='update_sc_node'),
32
+    url(r'^sc_node/(?P<scnode_id>[^/]+)/$',
33
+        views.ServiceChainNodeDetailsView.as_view(),
34
+        name='sc_node_details'),
35
+    url(r'^create_sc_spec$',
36
+        views.CreateServiceChainSpecView.as_view(),
37
+        name='create_sc_spec'),
38
+    url(r'^update_sc_spec/(?P<scspec_id>[^/]+)/$',
39
+        views.UpdateServiceChainSpecView.as_view(),
40
+        name='update_sc_spec'),
41
+    url(r'^sc_spec/(?P<scspec_id>[^/]+)/$',
42
+        views.ServiceChainSpecDetailsView.as_view(),
43
+        name='sc_spec_details'),
44
+    url(r'^create_sc_instance$',
45
+        views.CreateServiceChainInstanceView.as_view(),
46
+        name='create_sc_instance'),
47
+    url(r'^update_sc_instance/(?P<scinstance_id>[^/]+)/$',
48
+        views.UpdateServiceChainInstanceView.as_view(),
49
+        name='update_sc_instance'),
50
+    url(r'^sc_instance/(?P<scinstance_id>[^/]+)/$',
51
+        views.ServiceChainInstanceDetailsView.as_view(),
52
+        name='sc_instance_details'),
53
+]

+ 52
- 62
gbpui/panels/policytargets/urls.py View File

@@ -11,69 +11,59 @@
11 11
 #    under the License.
12 12
 
13 13
 
14
-from django.conf.urls import patterns  # noqa
15 14
 from django.conf.urls import url  # noqa
16 15
 
17 16
 import views
18 17
 
19
-urlpatterns = patterns('',
20
-                       url(r'^$',
21
-                           views.IndexView.as_view(),
22
-                           name='index'),
23
-                       url(r'^addpolicy_target$',
24
-                           views.AddPTGView.as_view(),
25
-                           name='addpolicy_target'),
26
-                       url(r'^addexternal_policy_target$',
27
-                           views.AddExternalPTGView.as_view(),
28
-                           name='addexternal_policy_target'),
29
-                       url(r'^updatepolicy_target/'
30
-                           '(?P<policy_target_id>[^/]+)/$',
31
-                           views.UpdatePTGView.as_view(),
32
-                           name='updatepolicy_target'),
33
-                       url(r'^update_ext_policy_target/'
34
-                          '(?P<ext_policy_target_id>[^/]+)/$',
35
-                           views.UpdateExternalPTGView.as_view(),
36
-                           name='update_ext_policy_target'),
37
-                       url(r'^policy_target/(?P<policy_target_id>[^/]+)/$',
38
-                           views.PTGDetailsView.as_view(),
39
-                           name='policy_targetdetails'),
40
-                       url(r'^ext_policy_target/'
41
-                          '(?P<ext_policy_target_id>[^/]+)/$',
42
-                           views.ExternalPTGDetailsView.as_view(),
43
-                           name='ext_policy_targetdetails'),
44
-                       url(r'^addvm/(?P<policy_target_id>[^/]+)/$',
45
-                           views.LaunchVMView.as_view(), name='addvm'),
46
-                       url(r'^ext_add_policy_rule_set/'
47
-                           '(?P<ext_policy_target_id>[^/]+)/$',
48
-                           views.ExtAddProvidedPRSView.as_view(),
49
-                           name='ext_add_provided_prs'),
50
-                       url(r'^add_policy_rule_set/'
51
-                           '(?P<policy_target_id>[^/]+)/$',
52
-                           views.AddProvidedPRSView.as_view(),
53
-                           name='add_provided_prs'),
54
-                       url(r'^ext_remove_policy_rule_set/'
55
-                           '(?P<ext_policy_target_id>[^/]+)/$',
56
-                           views.ExtRemoveProvidedPRSView.as_view(),
57
-                           name='ext_remove_provided_prs'),
58
-                       url(r'^remove_policy_rule_set/'
59
-                           '(?P<policy_target_id>[^/]+)/$',
60
-                           views.RemoveProvidedPRSView.as_view(),
61
-                           name='remove_provided_prs'),
62
-                       url(r'^add_consumed/(?P<policy_target_id>[^/]+)/$',
63
-                           views.AddConsumedPRSView.as_view(),
64
-                           name='add_consumed_prs'),
65
-                       url(r'^ext_add_consumed/'
66
-                           '(?P<ext_policy_target_id>[^/]+)/$',
67
-                           views.ExtAddConsumedPRSView.as_view(),
68
-                           name='ext_add_consumed_prs'),
69
-                       url(r'^remove_consumed/(?P<policy_target_id>[^/]+)/$',
70
-                           views.RemoveConsumedPRSView.as_view(),
71
-                           name='remove_consumed_prs'),
72
-                       url(r'^ext_remove_consumed/'
73
-                           '(?P<ext_policy_target_id>[^/]+)/$',
74
-                           views.ExtRemoveConsumedPRSView.as_view(),
75
-                           name='ext_remove_consumed_prs'),
76
-                       url(r'/check_ip_availability',
77
-                           views.check_ip_availability,
78
-                           name='check_ip_availability'),
79
-                       )
18
+urlpatterns = [
19
+    url(r'^$',
20
+        views.IndexView.as_view(),
21
+        name='index'),
22
+    url(r'^addpolicy_target$',
23
+        views.AddPTGView.as_view(),
24
+        name='addpolicy_target'),
25
+    url(r'^addexternal_policy_target$',
26
+        views.AddExternalPTGView.as_view(),
27
+        name='addexternal_policy_target'),
28
+    url(r'^updatepolicy_target/(?P<policy_target_id>[^/]+)/$',
29
+        views.UpdatePTGView.as_view(),
30
+        name='updatepolicy_target'),
31
+    url(r'^update_ext_policy_target/(?P<ext_policy_target_id>[^/]+)/$',
32
+        views.UpdateExternalPTGView.as_view(),
33
+        name='update_ext_policy_target'),
34
+    url(r'^policy_target/(?P<policy_target_id>[^/]+)/$',
35
+        views.PTGDetailsView.as_view(),
36
+        name='policy_targetdetails'),
37
+    url(r'^ext_policy_target/(?P<ext_policy_target_id>[^/]+)/$',
38
+        views.ExternalPTGDetailsView.as_view(),
39
+        name='ext_policy_targetdetails'),
40
+    url(r'^addvm/(?P<policy_target_id>[^/]+)/$',
41
+        views.LaunchVMView.as_view(), name='addvm'),
42
+    url(r'^ext_add_policy_rule_set/(?P<ext_policy_target_id>[^/]+)/$',
43
+        views.ExtAddProvidedPRSView.as_view(),
44
+        name='ext_add_provided_prs'),
45
+    url(r'^add_policy_rule_set/(?P<policy_target_id>[^/]+)/$',
46
+        views.AddProvidedPRSView.as_view(),
47
+        name='add_provided_prs'),
48
+    url(r'^ext_remove_policy_rule_set/(?P<ext_policy_target_id>[^/]+)/$',
49
+        views.ExtRemoveProvidedPRSView.as_view(),
50
+        name='ext_remove_provided_prs'),
51
+    url(r'^remove_policy_rule_set/(?P<policy_target_id>[^/]+)/$',
52
+        views.RemoveProvidedPRSView.as_view(),
53
+        name='remove_provided_prs'),
54
+    url(r'^add_consumed/(?P<policy_target_id>[^/]+)/$',
55
+        views.AddConsumedPRSView.as_view(),
56
+        name='add_consumed_prs'),
57
+    url(r'^ext_add_consumed/(?P<ext_policy_target_id>[^/]+)/$',
58
+        views.ExtAddConsumedPRSView.as_view(),
59
+        name='ext_add_consumed_prs'),
60
+    url(r'^remove_consumed/(?P<policy_target_id>[^/]+)/$',
61
+        views.RemoveConsumedPRSView.as_view(),
62
+        name='remove_consumed_prs'),
63
+    url(r'^ext_remove_consumed/(?P<ext_policy_target_id>[^/]+)/$',
64
+        views.ExtRemoveConsumedPRSView.as_view(),
65
+        name='ext_remove_consumed_prs'),
66
+    url(r'/check_ip_availability',
67
+        views.check_ip_availability,
68
+        name='check_ip_availability'),
69
+]

Loading…
Cancel
Save