|
16 | 16 | We undertake not to change the open source license (MIT license) applicable |
17 | 17 | to the current version of the project delivered to anyone in the future. |
18 | 18 | """ |
19 | | -from django.conf.urls import url |
| 19 | +from django.urls import re_path |
20 | 20 |
|
21 | 21 | from . import views |
22 | 22 |
|
23 | | -urlpatterns = [url(r"^authenticate/$", views.AuthenticationViewSet.as_view(), name='authenticate')] |
| 23 | +urlpatterns = [re_path(r"^authenticate/$", views.AuthenticationViewSet.as_view(), name='authenticate')] |
24 | 24 |
|
25 | 25 | urlpatterns += [ |
26 | | - url(r'^meta_info/$', views.SvcBasicViewSet.as_view({'get': 'get_meta_info'}), name='api.services.get_meta_info'), |
27 | | - url( |
| 26 | + re_path(r'^meta_info/$', views.SvcBasicViewSet.as_view({'get': 'get_meta_info'}), name='api.services.get_meta_info'), |
| 27 | + re_path( |
28 | 28 | r'^services/$', |
29 | 29 | views.ServiceManageViewSet.as_view({'get': 'list', 'post': 'create'}), |
30 | 30 | name='api.services.index', |
31 | 31 | ), |
32 | | - url( |
| 32 | + re_path( |
33 | 33 | r'^services/(?P<service_id>[0-9a-f-]{32,36})/$', |
34 | 34 | views.ServiceManageViewSet.as_view({'put': 'update'}), |
35 | 35 | name='api.services.update', |
36 | 36 | ), |
37 | | - url( |
| 37 | + re_path( |
38 | 38 | r'^services/(?P<service_id>[0-9a-f-]{32,36})/instances/(?P<instance_id>[0-9a-f-]{32,36})/$', |
39 | 39 | views.SvcInstanceViewSet.as_view({'post': 'provision'}), |
40 | 40 | name='api.services.instances_creation', |
41 | 41 | ), |
42 | | - url( |
| 42 | + re_path( |
43 | 43 | r'^services/(?P<service_id>[0-9a-f-]{32,36})/instances/$', |
44 | 44 | views.SvcInstanceViewSet.as_view({'get': 'retrieve_by_fields'}), |
45 | 45 | name='api.services.instances_retrieve_by_fields', |
46 | 46 | ), |
47 | | - url( |
| 47 | + re_path( |
48 | 48 | r'^services/(?P<service_id>[0-9a-f-]{32,36})/client-side-instances/(?P<instance_id>[0-9a-f-]{32,36})/$', |
49 | 49 | views.ClientSideSvcInstanceViewSet.as_view({'post': 'create'}), |
50 | 50 | name='api.services.client_side_instances_creation', |
51 | 51 | ), |
52 | | - url( |
| 52 | + re_path( |
53 | 53 | r'^plans/$', |
54 | 54 | views.PlanManageViewSet.as_view({'post': 'create'}), |
55 | 55 | name='api.plans.index', |
56 | 56 | ), |
57 | | - url( |
| 57 | + re_path( |
58 | 58 | r'^plans/(?P<plan_id>[0-9a-f-]{32,36})/$', |
59 | 59 | views.PlanManageViewSet.as_view({'put': 'update'}), |
60 | 60 | name='api.plans.update', |
61 | 61 | ), |
62 | | - url( |
| 62 | + re_path( |
63 | 63 | r'^instances/(?P<instance_id>[0-9a-f-]{32,36})/$', |
64 | 64 | views.SvcInstanceViewSet.as_view({'get': 'retrieve', 'patch': 'update', 'delete': 'destroy'}), |
65 | 65 | name='api.services.instance', |
66 | 66 | ), |
67 | | - url( |
| 67 | + re_path( |
68 | 68 | r'^instances/(?P<instance_id>[0-9a-f-]{32,36})/async_delete$', |
69 | 69 | views.SvcInstanceViewSet.as_view({'delete': 'async_destroy'}), |
70 | 70 | name='api.services.instance.async_destroy', |
71 | 71 | ), |
72 | | - url( |
| 72 | + re_path( |
73 | 73 | r'^client-side-instances/(?P<instance_id>[0-9a-f-]{32,36})/', |
74 | 74 | views.ClientSideSvcInstanceViewSet.as_view({'delete': 'destroy'}), |
75 | 75 | name='api.services.client_side_instance.destroy', |
76 | 76 | ), |
77 | | - url( |
| 77 | + re_path( |
78 | 78 | r'^instances/(?P<instance_id>[0-9a-f-]{32,36})/config/$', |
79 | 79 | views.SvcInstanceConfigViewSet.as_view({'get': 'retrieve', 'put': 'update'}), |
80 | 80 | name='api.services.instance_config', |
|
0 commit comments