diff options
Diffstat (limited to 'lcm')
-rw-r--r-- | lcm/lcm/nf/vnfs/urls.py | 15 | ||||
-rw-r--r-- | lcm/lcm/nf/vnfs/views.py | 32 |
2 files changed, 43 insertions, 4 deletions
diff --git a/lcm/lcm/nf/vnfs/urls.py b/lcm/lcm/nf/vnfs/urls.py index 1afc60eb..4a64bdf6 100644 --- a/lcm/lcm/nf/vnfs/urls.py +++ b/lcm/lcm/nf/vnfs/urls.py @@ -15,12 +15,21 @@ from django.conf.urls import patterns, url from rest_framework.urlpatterns import format_suffix_patterns -from lcm.nf.vnfs.views import CreateVnfIdentifier, InstantiateVnf +from lcm.nf.vnfs.views import CreateVnfIdentifier, InstantiateVnf, DeleteVnfIdentifier, QueryMultipleVnf, TerminateVnf, \ + QuerySingleVnf, GetOperationStatus urlpatterns = patterns('', url(r'^gvnfmapi/lcm/v1/vnf_instances$', CreateVnfIdentifier.as_view()), - url(r'^gvnfmapi/lcm/v1/vnf_instances/(?P<instanceId>[0-9a-zA-Z_-]+)/instantiate$', - InstantiateVnf.as_view()), + url(r'^gvnfmapi/lcm/v1/vnf_instances/(?P<instanceId>[0-9a-zA-Z_-]+)/instantiate$', InstantiateVnf.as_view()), + url(r'^gvnfmapi/lcm/v1/vnf_instances/(?P<instanceId>[0-9a-zA-Z_-]+)$', + DeleteVnfIdentifier.as_view()), + url(r'^gvnfmapi/lcm/v1/vnf_instances/(?P<instanceId>[0-9a-zA-Z_-]+)/terminate$', + TerminateVnf.as_view()), + url(r'^gvnfmapi/lcm/v1/vnf_instances$', QueryMultipleVnf.as_view()), + url(r'^gvnfmapi/lcm/v1/vnf_instances/(?P<instanceId>[0-9a-zA-Z_-]+)$', QuerySingleVnf.as_view()), + url( + r'^gvnfmapi/lcm/v1/vnf_lc_ops/(?P<vnfLcOpId>[0-9a-zA-Z_-]+)&responseId=(?P<responseId>[0-9a-zA-Z_-]+)$', + GetOperationStatus.as_view()), ) urlpatterns = format_suffix_patterns(urlpatterns)
\ No newline at end of file diff --git a/lcm/lcm/nf/vnfs/views.py b/lcm/lcm/nf/vnfs/views.py index b5846709..a1caefa2 100644 --- a/lcm/lcm/nf/vnfs/views.py +++ b/lcm/lcm/nf/vnfs/views.py @@ -57,4 +57,34 @@ class InstantiateVnf(APIView): # CreateVnfs(data, nf_inst_id, job_id).start() rsp = {"jobId": job_id} - return Response(data=rsp, status=status.HTTP_202_ACCEPTED)
\ No newline at end of file + return Response(data=rsp, status=status.HTTP_202_ACCEPTED) + + +class DeleteVnfIdentifier(APIView): + def delete(self, request): + logger.debug("DeleteVnfIdentifier--delete::> %s" % request.data) + return Response(data='', status=status.HTTP_202_ACCEPTED) + + +class TerminateVnf(APIView): + def post(self, request): + logger.debug("TerminateVnf--post::> %s" % request.data) + return Response(data='', status=status.HTTP_202_ACCEPTED) + + +class QueryMultipleVnf(APIView): + def get(self, request): + logger.debug("QueryMultipleVnf--get::> %s" % request.data) + return Response(data='', status=status.HTTP_202_ACCEPTED) + + +class QuerySingleVnf(APIView): + def get(self, request): + logger.debug("QuerySingleVnf--get::> %s" % request.data) + return Response(data='', status=status.HTTP_202_ACCEPTED) + + +class GetOperationStatus(APIView): + def get(self, request): + logger.debug("GetOperationStatus--get::> %s" % request.data) + return Response(data='', status=status.HTTP_202_ACCEPTED)
\ No newline at end of file |