summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2020-01-07 10:04:21 +0800
committerYan Yang <yangyanyj@chinamobile.com>2020-01-07 07:56:26 +0000
commite9135613d23b622dfe02f872a8a95da690ed1c95 (patch)
tree67bb0b873aa861683ccf8f2591aa33c411e70d16
parent5464ccb452d84a89ed70e056439c73cd7da0e31d (diff)
Fix the error of contextArray is null
Change-Id: Ic6645457f2e4dcd49524aedf0c69787c540301ba Issue-ID: VFC-1595 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rw-r--r--lcm/lcm/pub/vimapi/adaptor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py
index 6cda0af0..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"]