X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fnf%2Fvnfs%2Fviews.py;h=cfdf2800c156730b161731d9278ed412604daedb;hb=refs%2Fchanges%2F69%2F27769%2F1;hp=495e782a54f9a4fa3353a0444b7cf26fbc269daa;hpb=c4390ea3f4fc000058e3a1d24e38a4143671ba97;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/nf/vnfs/views.py b/lcm/lcm/nf/vnfs/views.py index 495e782a..cfdf2800 100644 --- a/lcm/lcm/nf/vnfs/views.py +++ b/lcm/lcm/nf/vnfs/views.py @@ -38,7 +38,8 @@ class CreateVnfAndQueryVnfs(APIView): except NFLCMException as e: logger.error(e.message) return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) - except: + except Exception as e: + logger.error(e.message) logger.error(traceback.format_exc()) return Response(data={'error': 'Failed to get Vnfs'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) @@ -51,7 +52,8 @@ class CreateVnfAndQueryVnfs(APIView): except NFLCMException as e: logger.error(e.message) return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) - except Exception: + except Exception as e: + logger.error(e.message) logger.error(traceback.format_exc()) return Response(data={'error': 'unexpected exception'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) rsp = { @@ -70,7 +72,8 @@ class InstantiateVnf(APIView): except NFLCMException as e: logger.error(e.message) return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) - except Exception: + except Exception as e: + logger.error(e.message) logger.error(traceback.format_exc()) return Response(data={'error': 'unexpected exception'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) rsp = { @@ -87,7 +90,8 @@ class DeleteVnfAndQueryVnf(APIView): except NFLCMException as e: logger.error(e.message) return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) - except: + except Exception as e: + logger.eror(e.message) logger.error(traceback.format_exc()) return Response(data={'error': 'Failed to get Vnf(%s)' % instanceid}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) @@ -100,7 +104,8 @@ class DeleteVnfAndQueryVnf(APIView): except NFLCMException as e: logger.error(e.message) return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) - except Exception: + except Exception as e: + 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) @@ -116,7 +121,8 @@ class TerminateVnf(APIView): except NFLCMException as e: logger.error(e.message) return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) - except Exception: + except Exception as e: + logger.error(e.message) logger.error(traceback.format_exc()) return Response(data={'error': 'unexpected exception'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) rsp = {