summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-04-01 11:02:07 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-04-01 11:02:07 +0800
commit05dac2a01e4c8ba4663f0cb62f7968646fd86e66 (patch)
tree53f67642c6f6e47769c56e73303595476684b102 /lcm
parent6ba8f9f2b2628a27aac2fd6878cbc31bd4a24f67 (diff)
Add not found case for get vnf
Change-Id: I2e1a17654890f65330604f590ff218f97ccd4d59 Issue-ID: VFC-1306 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/nf/views/curd_vnf_views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lcm/lcm/nf/views/curd_vnf_views.py b/lcm/lcm/nf/views/curd_vnf_views.py
index 25a98af8..6db70b7c 100644
--- a/lcm/lcm/nf/views/curd_vnf_views.py
+++ b/lcm/lcm/nf/views/curd_vnf_views.py
@@ -27,6 +27,7 @@ from lcm.nf.serializers.create_vnf_req import CreateVnfReqSerializer
from lcm.nf.serializers.vnf_instance import VnfInstanceSerializer
from lcm.nf.serializers.vnf_instances import VnfInstancesSerializer
from lcm.pub.exceptions import NFLCMException
+from lcm.pub.exceptions import NFLCMExceptionNotFound
logger = logging.getLogger(__name__)
@@ -109,6 +110,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 NFLCMExceptionNotFound as e:
+ return Response(data={'error': '%s' % e.message}, status=status.HTTP_404_NOT_FOUND)
except Exception as e:
logger.error(e.message)
logger.error(traceback.format_exc())