diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-03-02 11:22:43 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-03-02 11:22:43 +0800 |
commit | 062226977de3e506f31d2473f28f6409d5c81125 (patch) | |
tree | 09f58e5a6ac0178d2d58c1fa3717f24380782547 /lcm | |
parent | 8469a023d5bc96b27257f82e6eeedc727da78497 (diff) |
Modify code of vnf instaniation
Change-Id: Ib020200d9289c821e41948921fbd624145162f70
Issue-Id: GVNFM-42
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r-- | lcm/lcm/nf/vnfs/vnf_create/create_vnf_identifier.py | 8 | ||||
-rw-r--r-- | lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/lcm/lcm/nf/vnfs/vnf_create/create_vnf_identifier.py b/lcm/lcm/nf/vnfs/vnf_create/create_vnf_identifier.py index 7fcace1e..41eeda43 100644 --- a/lcm/lcm/nf/vnfs/vnf_create/create_vnf_identifier.py +++ b/lcm/lcm/nf/vnfs/vnf_create/create_vnf_identifier.py @@ -49,15 +49,11 @@ class CreateVnf: self.package_info = get_packageinfo_by_vnfdid(self.vnfd_id) for val in self.package_info: if self.vnfd_id == ignore_case_get(val, "vnfd_id"): - self.package_id = ignore_case_get(val, "package_id") - self.csar_id = ignore_case_get(val, "csar_id") + self.package_id = ignore_case_get(val, "csar_id") break - # self.package_info = get_packageinfo_by_vnfdid(self.vnfd_id) - # self.package_id = ignore_case_get(self.package_info, "package_id") - # self.csar_id = ignore_case_get(self.package_info, "csar_id") # get rawdata from catalog by csar_id - raw_data = query_rawdata_from_catalog(self.csar_id, self.data) + raw_data = query_rawdata_from_catalog(self.package_id, self.data) self.vnfd = toscautil.convert_vnfd_model(raw_data["rawData"]) # convert to inner json self.vnfd = json.JSONDecoder().decode(self.vnfd) diff --git a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py index d6e06a53..e94001e6 100644 --- a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py +++ b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py @@ -78,8 +78,7 @@ class InstVnf(Thread): self.package_info = get_packageinfo_by_vnfdid(self.vnfd_id) for val in self.package_info: if self.vnfd_id == ignore_case_get(val, "vnfd_id"): - self.package_id = ignore_case_get(val, "package_id") - self.csar_id = ignore_case_get(val, "csar_id") + self.package_id = ignore_case_get(val, "csar_id") break JobUtil.add_job_status(self.job_id, 10, 'Get rawdata from catalog by csar_id') @@ -87,7 +86,7 @@ class InstVnf(Thread): input_parameters = [] for key, val in self.data['additionalParams'].items(): input_parameters.append({"key": key, "value": val}) - raw_data = query_rawdata_from_catalog(self.csar_id, input_parameters) + raw_data = query_rawdata_from_catalog(self.package_id, input_parameters) self.vnfd_info = toscautil.convert_vnfd_model(raw_data["rawData"]) # convert to inner json self.vnfd_info = json.JSONDecoder().decode(self.vnfd_info) |