diff options
author | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-07-08 15:21:35 +0800 |
---|---|---|
committer | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-07-08 15:24:10 +0800 |
commit | 87ba2f52d9e649b48ca76be0d53f53010613709c (patch) | |
tree | a7ebea84212a5dc9209a9a80581c139be3c14ad9 /lcm/lcm/nf/views/curd_vnf_views.py | |
parent | bda9286b8d1ff765d8379dd8874697c93dd14a9c (diff) |
improve code coverage rate after vfclcm upgraded from python2 to python3
Change-Id: Icd7d3cec2831f68568697fc0c3eb329c3245df13
Issue-ID: VFC-1429
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
Diffstat (limited to 'lcm/lcm/nf/views/curd_vnf_views.py')
-rw-r--r-- | lcm/lcm/nf/views/curd_vnf_views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lcm/lcm/nf/views/curd_vnf_views.py b/lcm/lcm/nf/views/curd_vnf_views.py index e8c19d67..f5c7a77a 100644 --- a/lcm/lcm/nf/views/curd_vnf_views.py +++ b/lcm/lcm/nf/views/curd_vnf_views.py @@ -33,6 +33,7 @@ from lcm.nf.const import OPERATION_TYPE from .common import view_safe_call_with_log from .common import deal_vnf_action from .common import deal_indivdual_query +from lcm.pub.exceptions import NFLCMExceptionBadRequest logger = logging.getLogger(__name__) @@ -68,7 +69,7 @@ class CreateVnfAndQueryVnfs(APIView): logger.debug("CreateVnfIdentifier--post::> %s" % request.data) req_serializer = CreateVnfReqSerializer(data=request.data) if not req_serializer.is_valid(): - raise NFLCMException(req_serializer.errors) + raise NFLCMExceptionBadRequest(req_serializer.errors) nf_inst = CreateVnf(request.data).do_biz() rsp_data = {"id": nf_inst.nfinstid, |