diff options
-rw-r--r-- | lcm/ns/ns_instant.py | 8 | ||||
-rw-r--r-- | lcm/workflows/build_in.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lcm/ns/ns_instant.py b/lcm/ns/ns_instant.py index f1e464df..f73fbd94 100644 --- a/lcm/ns/ns_instant.py +++ b/lcm/ns/ns_instant.py @@ -28,7 +28,6 @@ from lcm.pub.msapi import sdc_run_catalog from lcm.pub.msapi.catalog import get_process_id, query_rawdata_from_catalog from lcm.pub.msapi.catalog import get_servicetemplate_id, get_servicetemplate from lcm.pub.msapi.extsys import select_vnfm -from lcm.pub.msapi.sdc_run_catalog import query_vnfpackage_by_id from lcm.pub.msapi.wso2bpel import workflow_run from lcm.pub.utils import toscautil from lcm.pub.utils.jobutil import JobUtil @@ -79,9 +78,10 @@ class InstantNSService(object): for vnf in ignore_case_get(plan_dict, "vnfs"): vnfd_id = vnf['properties']['id'] # vnfd = NfPackageModel.objects.get(vnfdid=vnfd_id) - vnfpackage_info = query_vnfpackage_by_id(vnfd_id) - vnfd_model = json.JSONDecoder().decode(ignore_case_get(vnfpackage_info["packageInfo"], "vnfdModel")) - vnfm_type = vnfd_model["metadata"].get("vnfmType", "ztevmanagerdriver") + # vnfpackage_info = query_vnfpackage_by_id(vnfd_id) + # vnfd_model = json.JSONDecoder().decode(ignore_case_get(vnfpackage_info["packageInfo"], "vnfdModel")) + # vnfm_type = vnfd_model["metadata"].get("vnfmType", "ztevmanagerdriver") + vnfm_type = vnf['properties'].get("nf_type", "ztevmanagerdriver") vimid = self.get_vnf_vim_id(vim_id, location_constraints, vnfd_id) vnfm_info = select_vnfm(vnfm_type=vnfm_type, vim_id=vimid) params_vnf.append({ diff --git a/lcm/workflows/build_in.py b/lcm/workflows/build_in.py index e562da74..86378ad2 100644 --- a/lcm/workflows/build_in.py +++ b/lcm/workflows/build_in.py @@ -124,7 +124,7 @@ def create_vnf(ns_inst_id, vnf_index, nf_param): data = json.JSONEncoder().encode({ "nsInstanceId": ns_inst_id, "vnfIndex": vnf_index, - "additionalParamForVnf": nf_param + "additionalParamForVnf": json.JSONDecoder().decode(nf_param) }) ret = restcall.req_by_msb(uri, "POST", data) |