summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-04-22 10:24:12 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-04-22 10:24:12 +0800
commitb34217a763584e6283412552142d76534a2d7bf2 (patch)
tree903111290c5dc3185d0730ddd9df9049836ea712 /lcm
parentab3d6a2654b0a280288d683e0348d8914e1746e7 (diff)
Modify code logic of gvnfm
Change-Id: Iab84c9ac7af1e40b5f17916ab392ebc93996d279 Issue-Id: GVNFM-50 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.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
index f9300540..32f8120f 100644
--- a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
+++ b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
@@ -125,18 +125,18 @@ class InstVnf(Thread):
content_args['additionalParam']['vnfmid'] = vnfmInfo[0].vnfminstid
logger.info('content_args=%s' % content_args)
apply_result = apply_grant_to_nfvo(json.dumps(content_args))
- vim_info = ignore_case_get(apply_result, "vim")
+ #vim_info = ignore_case_get(apply_result, "vim")
#vim_info = ignore_case_get(json.JSONDecoder().decode(apply_result), "vim")
for vdu in ignore_case_get(self.vnfd_info, "vdus"):
if "location_info" in vdu["properties"]:
- vdu["properties"]["location_info"]["vimid"] = ignore_case_get(vim_info, "vimid")
- vdu["properties"]["location_info"]["tenant"] = ignore_case_get(
- ignore_case_get(vim_info, "accessinfo"), "tenant")
+ vdu["properties"]["location_info"]["vimid"] = ignore_case_get(apply_result, "vimid")
+ vdu["properties"]["location_info"]["tenant"] = ignore_case_get(apply_result, "tenant")
else:
vdu["properties"]["location_info"] = {
- "vimid": ignore_case_get(vim_info, "vimid"),
- "tenant": ignore_case_get(ignore_case_get(vim_info, "accessinfo"), "tenant")}
+ "vimid": ignore_case_get(apply_result, "vimid"),
+ "tenant": ignore_case_get(apply_result, "tenant")}
+ logger.info('vdu["properties"]["location_info"]=%s' % vdu["properties"]["location_info"])
NfInstModel.objects.filter(nfinstid=self.nf_inst_id).update(status='INSTANTIATED', lastuptime=now_time())
JobUtil.add_job_status(self.job_id, 20, 'Nf instancing apply grant finish')