summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-11-14 17:36:10 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-11-14 17:36:10 +0800
commit26cb6aa172fe074cfc25effe0abdc8b5b15ba149 (patch)
tree11651d54f3e9ba39750ef3256653f3807056c188
parentd31d7c3c00b7facb05a17906e9152ee076d15a03 (diff)
Fix vm data save logic
Change-Id: I7a384f91a971356a4cb976ff89063d497dc6565e Issue-ID: VFC-1163 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/lcm/nf/biz/common.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lcm/lcm/nf/biz/common.py b/lcm/lcm/nf/biz/common.py
index 308ba060..3c21ab5a 100644
--- a/lcm/lcm/nf/biz/common.py
+++ b/lcm/lcm/nf/biz/common.py
@@ -120,13 +120,14 @@ def flavor_save(job_id, nf_inst_id, ret):
def vm_save(job_id, nf_inst_id, ret):
JobUtil.add_job_status(job_id, 70, 'Create vms!')
vm_id = str(uuid.uuid4())
+ nics = ignore_case_get(ret, "nicArray")
VmInstModel.objects.create(
vmid=vm_id,
vmname=ignore_case_get(ret, "name"),
vimid=ignore_case_get(ret, "vimId"),
resourceid=ignore_case_get(ret, "id"),
tenant=ignore_case_get(ret, "tenantId"),
- nic_array=ignore_case_get(ret, "nicArray"),
+ nic_array=nics if nics else "null",
metadata=ignore_case_get(ret, "metadata"),
volume_array=ignore_case_get(ret, "volumeArray"),
server_group=ignore_case_get(ret, "serverGroup"),