diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2017-10-26 11:36:19 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2017-10-26 12:01:34 +0800 |
commit | 1f363878b997f16d9ed2eb506431e400cf1089d5 (patch) | |
tree | e44b873112504d3aaf75791e26e00b9dc46aa334 | |
parent | d6726ac01bf00a5952e024bab2e0014190d9bd32 (diff) |
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 <fu.jinhua@zte.com.cn>
-rw-r--r-- | lcm/pub/msapi/sdc_run_catalog.py | 6 |
1 files 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): |