diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-11-14 17:36:10 +0800 |
---|---|---|
committer | Fu Jinhua <fu.jinhua@zte.com.cn> | 2018-11-14 09:44:26 +0000 |
commit | 3c4f84448181551a9daa5804b6512aee8f7e903c (patch) | |
tree | 11651d54f3e9ba39750ef3256653f3807056c188 | |
parent | d26ae96a99f634ed6066c28b72d89c3c5bb9f29e (diff) |
Fix vm data save logic
Change-Id: I7a384f91a971356a4cb976ff89063d497dc6565e
Issue-ID: VFC-1163
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
(cherry picked from commit 26cb6aa172fe074cfc25effe0abdc8b5b15ba149)
-rw-r--r-- | lcm/lcm/nf/biz/common.py | 3 |
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"), |