diff options
author | Haibin Huang <haibin.huang@intel.com> | 2018-11-09 16:24:37 +0800 |
---|---|---|
committer | Haibin Huang <haibin.huang@intel.com> | 2018-11-12 08:22:11 +0000 |
commit | 4a17e781eaae262bcaebeade4f8286aacfc808da (patch) | |
tree | edd46a4df3de7e6ac9bf7190230cae3dd9d93037 | |
parent | f115fb16d5b2ec75bf0ad30fe28cffeda722d574 (diff) |
Get image not path
Change-Id: I0d62883262172e6083774a434af49cf92300aaf7
Issue-ID: VFC-1182
Signed-off-by: Haibin Huang <haibin.huang@intel.com>
-rw-r--r-- | lcm/lcm/pub/vimapi/adaptor.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py index 2680ff9b..44153620 100644 --- a/lcm/lcm/pub/vimapi/adaptor.py +++ b/lcm/lcm/pub/vimapi/adaptor.py @@ -15,6 +15,7 @@ import logging import time import json +import os from lcm.pub.utils.values import ignore_case_get, set_opt_val from lcm.pub.msapi.aai import get_flavor_info @@ -369,7 +370,7 @@ def create_vm(vim_cache, res_cache, data, vm, do_notify, res_type): for artifact in vm["artifacts"]: if artifact["artifact_name"] == "sw_image": # TODO: after DM define - img_name = artifact["file"] + img_name = os.path.basename(artifact["file"]) break if not img_name: raise VimException("Undefined image(%s)" % vm["artifacts"], ERR_CODE) |