Change-Id: Ie1f5a61973479b105313e2bd556dd2902c9e0454
Issue-ID: VFC-682
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
return Response(data={'error': 'Failed to get Vnf(%s)' % instanceid},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
return Response(data={'error': 'Failed to get Vnf(%s)' % instanceid},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ @swagger_auto_schema(
+ responses={
+ status.HTTP_204_NO_CONTENT: "Successfully",
+ status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal error"
+ }
+ )
def delete(self, request, instanceid):
logger.debug("DeleteVnfIdentifier--delete::> %s" % request.data)
try:
DeleteVnf(request.data, instanceid).do_biz()
def delete(self, request, instanceid):
logger.debug("DeleteVnfIdentifier--delete::> %s" % request.data)
try:
DeleteVnf(request.data, instanceid).do_biz()
+
+ return Response(data=None, status=status.HTTP_204_NO_CONTENT)
except NFLCMException as e:
logger.error(e.message)
return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
except NFLCMException as e:
logger.error(e.message)
return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
logger.error(e.message)
logger.error(traceback.format_exc())
return Response(data={'error': 'unexpected exception'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
logger.error(e.message)
logger.error(traceback.format_exc())
return Response(data={'error': 'unexpected exception'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
- return Response(data=None, status=status.HTTP_204_NO_CONTENT)
class TerminateVnf(APIView):
class TerminateVnf(APIView):