a3de04a056c43ee57d5fc2ebf76e6086d11a702f
[multicloud/azure.git] / azure / multicloud_azure / swagger / urls.py
1 # Copyright (c) 2018 Amdocs
2 # Copyright (c) 2018 Amdocs
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
14 from django.conf.urls import url
15 from rest_framework.urlpatterns import format_suffix_patterns
16
17 from multicloud_azure.swagger.views.swagger_json import SwaggerJsonView
18
19
20 # Registry
21 from multicloud_azure.swagger.views.registry.views import Registry
22 from multicloud_azure.swagger.views.registry.views import UnRegistry
23 from multicloud_azure.swagger.views.registry.views import APIv1Registry
24 from multicloud_azure.swagger.views.registry.views import APIv1UnRegistry
25
26 urlpatterns = [
27     # swagger
28     url(r'^api/multicloud-azure/v0/swagger.json$', SwaggerJsonView.as_view()),
29
30     # Registry
31     url(r'^api/multicloud-azure/v0/(?P<vimid>[0-9a-z-A-Z\-\_]+)/registry$',
32         Registry.as_view()),
33
34     url(r'^api/multicloud-azure/v0/(?P<vimid>[0-9a-z-A-Z\-\_]+)$',
35         UnRegistry.as_view()),
36
37     url(r'^api/multicloud-azure/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)'
38         r'/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/registry$',
39         APIv1Registry.as_view()),
40
41     url(r'^api/multicloud-azure/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)'
42         r'/(?P<cloud_region_id>[0-9a-zA-Z_-]+)$',
43         APIv1UnRegistry.as_view()),
44
45 ]
46
47 urlpatterns = format_suffix_patterns(urlpatterns)