summaryrefslogtreecommitdiffstats
path: root/lcm/lcm/pub/vimapi
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-04-21 00:56:05 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-04-21 00:56:05 +0800
commit15c96bf2692b7da348ea3c91cb04c64ddaeb7742 (patch)
tree781d20a53104268f0e7a31b126d36ff08a268aeb /lcm/lcm/pub/vimapi
parentfd6c46449965098f6f1bbe4cad236b4c2bbf8bea (diff)
Modify code of adapter to fix bugs
Issue: GVNFM-50 Change-Id: I78bcaab63f74e595f47eafbdb107c2d8bbb2154c Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm/lcm/pub/vimapi')
-rw-r--r--lcm/lcm/pub/vimapi/adaptor.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py
index 9cbc7b16..28c173da 100644
--- a/lcm/lcm/pub/vimapi/adaptor.py
+++ b/lcm/lcm/pub/vimapi/adaptor.py
@@ -279,7 +279,11 @@ def create_vm(vim_cache, res_cache, data, vm, do_notify, res_type):
ret = api.create_vm(vim_id, tenant_id, param)
do_notify(res_type, ret)
- vm_id, vm_name, return_code = ret["id"], ret["name"], ret["returnCode"]
+ #vm_id, vm_name, return_code = ret["id"], ret["name"], ret["returnCode"]
+ vm_id, return_code = ret["id"], ret["returnCode"]
+ if ignore_case_get(ret, "name"):
+ vm_name = vm["properties"]["name"]
+ logger.debug("vm_name:%s" % vm_name)
opt_vm_status = "Timeout"
retry_count, max_retry_count = 0, 100
while retry_count < max_retry_count: