from rest_framework.response import Response
from rest_framework.views import APIView
+from lcm.ns.serializers.sol.create_ns_serializers import CreateNsRequestSerializer, CreateNsRespSerializer
+from lcm.ns.serializers.sol.pub_serializers import QueryNsRespSerializer
+
logger = logging.getLogger(__name__)
class NSInstancesView(APIView):
+ @swagger_auto_schema(
+ request_body=None,
+ responses={
+ status.HTTP_200_OK: QueryNsRespSerializer(help_text="NS instances", many=True),
+ status.HTTP_500_INTERNAL_SERVER_ERROR: "Inner error"
+ }
+ )
def get(self, request):
logger.debug(request.query_params)
# todo
+ @swagger_auto_schema(
+ request_body=CreateNsRequestSerializer(),
+ responses={
+ status.HTTP_201_CREATED: CreateNsRespSerializer(),
+ status.HTTP_500_INTERNAL_SERVER_ERROR: "Inner error"
+ }
+ )
def post(self, request):
logger.debug("Enter NSInstancesView::POST ns_instances %s", request.data)
# todo