update portid in when create vm
[vfc/gvnfm/vnflcm.git] / lcm / lcm / pub / vimapi / adaptor.py
index 27b6433..83727f2 100644 (file)
@@ -391,6 +391,7 @@ def create_vm(vim_cache, res_cache, data, vm, do_notify, res_type):
     set_opt_val(param, "serverGroup", "")      # TODO the ServerGroup for anti-affinity and affinity
 
     ret = api.create_vm(vim_id, tenant_id, param)
+    ret["ports"] = [nic.get("portId") for nic in param["nicArray"]]
     do_notify(res_type, ret)
     vm_id = ret["id"]
     if ignore_case_get(ret, "name"):