create NS
[vfc/nfvo/lcm.git] / lcm / ns / views / sol / ns_instances_views.py
1 import logging
2
3 from drf_yasg.utils import swagger_auto_schema
4 from rest_framework import status
5 from rest_framework.response import Response
6 from rest_framework.views import APIView
7
8 logger = logging.getLogger(__name__)
9
10
11 class NSInstancesView(APIView):
12     def get(self, request):
13         logger.debug(request.query_params)
14         # todo
15
16     def post(self, request):
17         logger.debug("Enter NSInstancesView::POST ns_instances %s", request.data)
18         # todo
19         return Response(data={}, status=status.HTTP_201_CREATED)
20
21
22 class IndividualNsInstanceView(APIView):
23     def get(self, request, id):
24         logger.debug("Enter IndividualNsInstanceView::get ns(%s)", id)
25         # todo
26         return Response(data={}, status=status.HTTP_200_OK)
27
28     @swagger_auto_schema(
29         request_body=None,
30         responses={
31             status.HTTP_204_NO_CONTENT: None
32         }
33     )
34     def delete(self, request, id):
35         logger.debug("Enter IndividualNsInstanceView::DELETE ns_instance(%s)", id)
36         # todo
37         return Response(data={}, status=status.HTTP_204_NO_CONTENT)