diff options
-rw-r--r-- | lcm/lcm/nf/biz/delete_vnf.py | 9 | ||||
-rw-r--r-- | lcm/lcm/nf/views/curd_vnf_views.py | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/lcm/lcm/nf/biz/delete_vnf.py b/lcm/lcm/nf/biz/delete_vnf.py index c0940303..6148e6a6 100644 --- a/lcm/lcm/nf/biz/delete_vnf.py +++ b/lcm/lcm/nf/biz/delete_vnf.py @@ -13,10 +13,8 @@ # limitations under the License. import logging -import traceback from lcm.pub.database.models import NfInstModel, NfvoRegInfoModel -from lcm.pub.exceptions import NFLCMException logger = logging.getLogger(__name__) @@ -27,16 +25,9 @@ class DeleteVnf: self.nf_inst_id = instanceid def do_biz(self): - try: self.check_parameter() self.delete_info_from_db() logger.debug('VnfInst(%s) is deleted.' % self.nf_inst_id) - except NFLCMException as e: - logger.debug('Delete VNF instance[%s] failed: %s', self.nf_inst_id, e.message) - except Exception as e: - logger.error(e.message) - logger.error(traceback.format_exc()) - logger.debug('Delete VNF instance[%s] failed' % self.nf_inst_id) def check_parameter(self): vnf_insts = NfInstModel.objects.filter(nfinstid=self.nf_inst_id) diff --git a/lcm/lcm/nf/views/curd_vnf_views.py b/lcm/lcm/nf/views/curd_vnf_views.py index 33f32a10..0d3b5ff5 100644 --- a/lcm/lcm/nf/views/curd_vnf_views.py +++ b/lcm/lcm/nf/views/curd_vnf_views.py @@ -124,8 +124,10 @@ class DeleteVnfAndQueryVnf(APIView): return Response(data=None, status=status.HTTP_204_NO_CONTENT) except NFLCMException as e: logger.error(e.message) + logger.debug('Delete VNF instance[%s] failed' % instanceid) return Response(data={'error': '%s' % e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) except Exception as e: logger.error(e.message) logger.error(traceback.format_exc()) + logger.debug('Delete VNF instance[%s] failed' % instanceid) return Response(data={'error': 'unexpected exception'}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) |