From 1f363878b997f16d9ed2eb506431e400cf1089d5 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Thu, 26 Oct 2017 11:36:19 +0800 Subject: Fix bugs for integeration in cmcc lab Change return value for nsd/vnfd convert Change-Id: Iad062da1d53e01ddc05a1e100d7fc2db85181d14 Issue-Id: VFC-558 Signed-off-by: fujinhua --- lcm/pub/msapi/sdc_run_catalog.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcm/pub/msapi/sdc_run_catalog.py b/lcm/pub/msapi/sdc_run_catalog.py index e62ae6d6..e12c2142 100644 --- a/lcm/pub/msapi/sdc_run_catalog.py +++ b/lcm/pub/msapi/sdc_run_catalog.py @@ -27,7 +27,8 @@ def parse_nsd(csar_id, input_parameters=[]): if ret[0] != 0: logger.error("Status code is %s, detail is %s.", ret[2], ret[1]) raise NSLCMException("Failed to parsernsd of CSAR(%s) from catalog." % csar_id) - return json.JSONDecoder().decode(ret[1]) + ns_model = json.JSONDecoder().decode(ret[1]) + return ns_model.get("model") def parse_vnfd(csar_id, input_parameters=[]): @@ -36,7 +37,8 @@ def parse_vnfd(csar_id, input_parameters=[]): if ret[0] != 0: logger.error("Status code is %s, detail is %s.", ret[2], ret[1]) raise NSLCMException("Failed to parse_vnfd of CSAR(%s) from catalog." % csar_id) - return json.JSONDecoder().decode(ret[1]) + vnf_model = json.JSONDecoder().decode(ret[1]) + return vnf_model.get("model") def query_nspackage_by_id(csar_id): -- cgit 1.2.3-korg