summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-03-03 09:07:19 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-03-03 09:07:19 +0800
commit6070e5379a56d3af1b43374722188c853b2cdb2a (patch)
tree2c67e6393e345389fb852efa790d308f4dcfef71 /lcm
parente40cec8af30d75e8c4c39f81a3d98e654aa2fa1f (diff)
Modify code of update database table
Change-Id: I7639d787d30cb8fc937a1eb0f5261326ad030dd6 Issue-Id: GVNFM-43 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
index 08a3c37d..aa72c4e7 100644
--- a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
+++ b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
@@ -86,12 +86,17 @@ class InstVnf(Thread):
self.update_cps()
self.check_parameter_exist()
+ metadata = ignore_case_get(self.vnfd_info, "metadata")
+ version = ignore_case_get(metadata, "vnfd_version")
+ vendor = ignore_case_get(metadata, "vendor")
+ netype = ignore_case_get(metadata, "vnf_type")
+ vnfsoftwareversion = ignore_case_get(metadata, "version")
+ vnfd_model = self.vnfd_info
NfInstModel.objects.filter(nfinstid=self.nf_inst_id).\
- update(flavour_id=ignore_case_get(self.data, "flavourId"),
- input_params=self.data,
- vnfd_model=self.vnfd_info,
- localizationLanguage=ignore_case_get(self.data, 'localizationLanguage'),
- lastuptime=now_time())
+ update(package_id=self.package_id, flavour_id=ignore_case_get(self.data, "flavourId"), version=version,
+ vendor=vendor, netype=netype, vnfd_model=vnfd_model, status='NOT_INSTANTIATED', vnfdid=self.vnfd_id,
+ localizationLanguage=ignore_case_get(self.data, 'localizationLanguage'), input_params=self.data,
+ vnfSoftwareVersion=vnfsoftwareversion, lastuptime=now_time())
JobUtil.add_job_status(self.job_id, 15, 'Nf instancing pre-check finish')
logger.info("Nf instancing pre-check finish")