X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fpub%2Fvimapi%2Fadaptor.py;h=b79aaacadf5030f4ca052ad4ac7ba7c96fd584d5;hb=e9135613d23b622dfe02f872a8a95da690ed1c95;hp=62fd39fe64f0764105ca50d165525467cdca5313;hpb=0f58e3fbde2064cf1f92430769835aa104ed8488;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py index 62fd39fe..b79aaaca 100644 --- a/lcm/lcm/pub/vimapi/adaptor.py +++ b/lcm/lcm/pub/vimapi/adaptor.py @@ -390,7 +390,7 @@ def create_vm(vim_cache, res_cache, data, vm, do_notify, res_type): param["nicArray"].append({ "portId": get_res_id(res_cache, RES_PORT, cp_id) }) - param["contextArray"] = ignore_case_get(vm["properties"], "inject_files") + param["contextArray"] = ignore_case_get(vm["properties"], "inject_files", []) logger.debug("contextArray:%s", param["contextArray"]) for vol_data in ignore_case_get(vm, "volume_storages"): vol_id = vol_data["volume_storage_id"] @@ -407,6 +407,8 @@ def create_vm(vim_cache, res_cache, data, vm, do_notify, res_type): ret = api.create_vm(vim_id, tenant_id, param) ret["ports"] = [nic.get("portId") for nic in param["nicArray"]] + ret["vimId"] = vim_id + ret["tenantId"] = tenant_id do_notify(res_type, ret) vm_id = ret["id"] if ignore_case_get(ret, "name"):