summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-02-06 18:12:26 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-02-06 18:12:26 +0800
commit71dc300e10883633f05bbd7368264ed18e9a3474 (patch)
tree209e6e9bd6c9f65e3650440014e7475dc8830ce9
parent081ea32d4f41aee93dc5dbb82c7bc6ca0a38a288 (diff)
Modify vfc-ztevnfmdriver urls
Change-Id: I9f919005eabefda715d4430e715847edcef9d0cc Issue-ID: VFC-736 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--zte/vmanager/driver/interfaces/urls.py21
-rw-r--r--zte/vmanager/driver/swagger/views.py3
2 files changed, 8 insertions, 16 deletions
diff --git a/zte/vmanager/driver/interfaces/urls.py b/zte/vmanager/driver/interfaces/urls.py
index 745ff830..5f972b47 100644
--- a/zte/vmanager/driver/interfaces/urls.py
+++ b/zte/vmanager/driver/interfaces/urls.py
@@ -17,23 +17,18 @@ from django.conf.urls import url
from driver.interfaces import views
urlpatterns = [
- url(r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs$', views.instantiate_vnf,
- name='instantiate_vnf'),
- url(
- r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>'
- r'[0-9a-zA-Z\-\_]+)/terminate$',
+ url(r'^api/ztevnfmdriver/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs$', views.instantiate_vnf, name='instantiate_vnf'),
+ url(r'^api/ztevnfmdriver/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)/terminate$',
views.terminate_vnf, name='terminate_vnf'),
- url(
- r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>'
- r'[0-9a-zA-Z\-\_]+)$',
+ url(r'^api/ztevnfmdriver/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)$',
views.query_vnf, name='query_vnf'),
- url(r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/jobs/(?P<jobid>[0-9a-zA-Z\-\_]+)$',
+ url(r'^api/ztevnfmdriver/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/jobs/(?P<jobid>[0-9a-zA-Z\-\_]+)$',
views.operation_status, name='operation_status'),
- url(r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/resource/grant$', views.grantvnf, name='grantvnf'),
- url(r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/vnfs/lifecyclechangesnotification$', views.notify, name='notify'),
- url(r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)/scale$',
+ url(r'^api/ztevnfmdriver/v1/resource/grant$', views.grantvnf, name='grantvnf'),
+ url(r'^api/ztevnfmdriver/v1/vnfs/lifecyclechangesnotification$', views.notify, name='notify'),
+ url(r'^api/ztevnfmdriver/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)/scale$',
views.scale, name='scale'),
- url(r'^api/(?P<vnfmtype>[0-9a-zA-Z\-\_]+)/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)/heal$',
+ url(r'^api/ztevnfmdriver/v1/(?P<vnfmid>[0-9a-zA-Z\-\_]+)/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z\-\_]+)/heal$',
views.heal, name='heal'),
url(r'^samples/$', views.samples, name='samples')
]
diff --git a/zte/vmanager/driver/swagger/views.py b/zte/vmanager/driver/swagger/views.py
index e9c96043..400d6dd1 100644
--- a/zte/vmanager/driver/swagger/views.py
+++ b/zte/vmanager/driver/swagger/views.py
@@ -18,9 +18,6 @@ from rest_framework.response import Response
class SwaggerView(APIView):
- """
- Show rest api swagger.
- """
def get(self, request, format=None):
json_file = os.path.join(os.path.dirname(__file__), 'swagger.json')
f = open(json_file)