diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-10-27 09:32:48 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-10-27 09:39:46 +0800 |
commit | e64b4b3308d5fad6b24634c0cdc487c2f37458bd (patch) | |
tree | 4734324e6a6c2b31c43b600ef322521c52582c1d | |
parent | 08a5d16bb375df8e16f8d14418bb2e3d372b1dd8 (diff) |
Modify the logic of query vnfm_type
Change-Id: I8b6515f19785cca8fbd2d129c43f32b61aac48e7
Issue-ID: VFC-558
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r-- | lcm/ns/ns_instant.py | 8 |
1 files changed, 4 insertions, 4 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({ |