Modify swagger
[vfc/gvnfm/vnflcm.git] / lcm / lcm / nf / views / curd_vnf_views.py
index 078053a..9b141b3 100644 (file)
@@ -57,7 +57,7 @@ class CreateVnfAndQueryVnfs(APIView):
             return Response(data={'error': 'Failed to get Vnfs'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
 
     @swagger_auto_schema(
-        request_body=VnfInstanceSerializer(),
+        request_body=CreateVnfReqSerializer(),
         responses={
             status.HTTP_201_CREATED: VnfInstanceSerializer(),
             status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal error"
@@ -74,7 +74,8 @@ class CreateVnfAndQueryVnfs(APIView):
             create_vnf_resp_serializer = VnfInstanceSerializer(data={"id": nf_inst.nfinstid,
                                                                      "vnfProvider": nf_inst.vendor,
                                                                      "vnfdVersion": nf_inst.version,
-                                                                     "vnfPkgId": nf_inst.package_id})
+                                                                     "vnfPkgId": nf_inst.package_id,
+                                                                     "instantiationState": nf_inst.status})
             if not create_vnf_resp_serializer.is_valid():
                 raise NFLCMException(create_vnf_resp_serializer.errors)
             return Response(data=create_vnf_resp_serializer.data, status=status.HTTP_201_CREATED)