summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/nf/biz/common.py3
-rw-r--r--lcm/lcm/pub/vimapi/adaptor.py2
2 files changed, 3 insertions, 2 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"),
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py
index 44153620..a7a0fd3d 100644
--- a/lcm/lcm/pub/vimapi/adaptor.py
+++ b/lcm/lcm/pub/vimapi/adaptor.py
@@ -251,7 +251,7 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type):
subnet_id = get_res_id(res_cache, RES_SUBNET, port["vl_id"])
param = {
"networkId": network_id,
- "name": port["properties"].get("name", "undefined")
+ "name": port["cp_id"]
}
set_opt_val(param, "subnetId", subnet_id)
set_opt_val(param, "macAddress", ignore_case_get(port["properties"], "mac_address"))