From 71dc300e10883633f05bbd7368264ed18e9a3474 Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Tue, 6 Feb 2018 18:12:26 +0800 Subject: Modify vfc-ztevnfmdriver urls Change-Id: I9f919005eabefda715d4430e715847edcef9d0cc Issue-ID: VFC-736 Signed-off-by: ying.yunlong --- zte/vmanager/driver/interfaces/urls.py | 21 ++++++++------------- zte/vmanager/driver/swagger/views.py | 3 --- 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[0-9a-zA-Z\-\_]+)/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs$', views.instantiate_vnf, - name='instantiate_vnf'), - url( - r'^api/(?P[0-9a-zA-Z\-\_]+)/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs/(?P' - r'[0-9a-zA-Z\-\_]+)/terminate$', + url(r'^api/ztevnfmdriver/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs$', views.instantiate_vnf, name='instantiate_vnf'), + url(r'^api/ztevnfmdriver/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs/(?P[0-9a-zA-Z\-\_]+)/terminate$', views.terminate_vnf, name='terminate_vnf'), - url( - r'^api/(?P[0-9a-zA-Z\-\_]+)/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs/(?P' - r'[0-9a-zA-Z\-\_]+)$', + url(r'^api/ztevnfmdriver/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs/(?P[0-9a-zA-Z\-\_]+)$', views.query_vnf, name='query_vnf'), - url(r'^api/(?P[0-9a-zA-Z\-\_]+)/v1/(?P[0-9a-zA-Z\-\_]+)/jobs/(?P[0-9a-zA-Z\-\_]+)$', + url(r'^api/ztevnfmdriver/v1/(?P[0-9a-zA-Z\-\_]+)/jobs/(?P[0-9a-zA-Z\-\_]+)$', views.operation_status, name='operation_status'), - url(r'^api/(?P[0-9a-zA-Z\-\_]+)/v1/resource/grant$', views.grantvnf, name='grantvnf'), - url(r'^api/(?P[0-9a-zA-Z\-\_]+)/v1/vnfs/lifecyclechangesnotification$', views.notify, name='notify'), - url(r'^api/(?P[0-9a-zA-Z\-\_]+)/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs/(?P[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[0-9a-zA-Z\-\_]+)/vnfs/(?P[0-9a-zA-Z\-\_]+)/scale$', views.scale, name='scale'), - url(r'^api/(?P[0-9a-zA-Z\-\_]+)/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs/(?P[0-9a-zA-Z\-\_]+)/heal$', + url(r'^api/ztevnfmdriver/v1/(?P[0-9a-zA-Z\-\_]+)/vnfs/(?P[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) -- cgit 1.2.3-korg