X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Fns%2Fviews%2Fsol%2Fns_instances_views.py;h=6fcae3ffb0ed880e55864b6f528b58521d832702;hb=0876c326a9f9809fbb35d512a4a95f9fad00e445;hp=1af7cf7817d438f5d52c89a49364db900448deff;hpb=18f111c9442c54fdfcc1ea666c8ba28dab267390;p=vfc%2Fnfvo%2Flcm.git diff --git a/lcm/ns/views/sol/ns_instances_views.py b/lcm/ns/views/sol/ns_instances_views.py index 1af7cf78..6fcae3ff 100644 --- a/lcm/ns/views/sol/ns_instances_views.py +++ b/lcm/ns/views/sol/ns_instances_views.py @@ -79,7 +79,7 @@ class NSInstancesView(APIView): return Response(data={'nsInstanceId': "test"}, status=status.HTTP_201_CREATED) csar_id = ignore_case_get(request.data, 'nsdId') ns_name = ignore_case_get(request.data, 'nsName') - description = ignore_case_get(request.data, 'description') + description = ignore_case_get(request.data, 'nsDescription') context = { "globalCustomerId": globalCustomerId, "serviceType": serviceType @@ -88,13 +88,13 @@ class NSInstancesView(APIView): logger.debug("CreateNSView::post::ret={'nsInstanceId':%s}", ns_inst_id) ns_filter = {"ns_inst_id": ns_inst_id} nsInstance = GetNSInfoService(ns_filter).get_ns_info(is_sol=True)[0] + logger.debug("nsInstance: %s" % nsInstance) resp_serializer = NsInstanceSerializer(data=nsInstance) if not resp_serializer.is_valid(): raise NSLCMException(resp_serializer.errors) response = Response(data=resp_serializer.data, status=status.HTTP_201_CREATED) response["Location"] = NS_INSTANCE_BASE_URI % nsInstance['id'] return response - except BadRequestException as e: logger.error("Exception in CreateNS: %s", e.message) data = {'status': status.HTTP_400_BAD_REQUEST, 'detail': e.message} @@ -135,7 +135,7 @@ class IndividualNsInstanceView(APIView): @swagger_auto_schema( request_body=None, responses={ - status.HTTP_204_NO_CONTENT: None + status.HTTP_204_NO_CONTENT: "HTTP_204_NO_CONTENT" } ) def delete(self, request, ns_instance_id):