summaryrefslogtreecommitdiffstats
path: root/lcm/lcm/nf/views/curd_vnf_views.py
diff options
context:
space:
mode:
authorhongyuzhao <zhao.hongyu@zte.com.cn>2019-07-08 15:21:35 +0800
committerhongyuzhao <zhao.hongyu@zte.com.cn>2019-07-08 15:24:10 +0800
commit87ba2f52d9e649b48ca76be0d53f53010613709c (patch)
treea7ebea84212a5dc9209a9a80581c139be3c14ad9 /lcm/lcm/nf/views/curd_vnf_views.py
parentbda9286b8d1ff765d8379dd8874697c93dd14a9c (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.py3
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,