summaryrefslogtreecommitdiffstats
path: root/lcm/lcm/pub/vimapi
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-02-23 19:45:11 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-02-23 19:45:11 +0800
commit97f8569b9781e705851f65c51eb7b85242a9037d (patch)
tree14d7fcbdbe3519116af9cd55388c163109fd12da /lcm/lcm/pub/vimapi
parentf74e80669eb2ea45755fd7b111bfa7852c4a03f2 (diff)
Modify code and test case of lcm notify
Change-Id: I5117c53266dbb0c0df994d2a75fe81b62e80dc49 Issue-Id: GVNFM-34 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.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py
index 4b156708..fed69b1d 100644
--- a/lcm/lcm/pub/vimapi/adaptor.py
+++ b/lcm/lcm/pub/vimapi/adaptor.py
@@ -101,6 +101,7 @@ def create_volume(vim_cache, res_cache, vol, do_notify, res_type):
vim_id, tenant_name = location_info["vimid"], location_info["tenant"]
tenant_id = get_tenant_id(vim_cache, vim_id, tenant_name)
ret = api.create_volume(vim_id, tenant_id, param)
+ ret["nodeId"] = vol["volume_storage_id"]
do_notify(res_type, ret)
vol_id, vol_name, return_code = ret["id"], ret["name"], ret["returnCode"]
set_res_cache(res_cache, res_type, vol["volume_storage_id"], vol_id)
@@ -128,6 +129,7 @@ def create_network(vim_cache, res_cache, network, do_notify, res_type):
vim_id, tenant_name = location_info["vimid"], location_info["tenant"]
tenant_id = get_tenant_id(vim_cache, vim_id, tenant_name)
ret = api.create_network(vim_id, tenant_id, param)
+ ret["nodeId"] = network["vl_id"]
do_notify(res_type, ret)
set_res_cache(res_cache, res_type, network["vl_id"], ret["id"])
@@ -179,6 +181,7 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type):
vim_id, tenant_name = location_info["vimid"], location_info["tenant"]
tenant_id = get_tenant_id(vim_cache, vim_id, tenant_name)
ret = api.create_subnet(vim_id, tenant_id, param)
+ ret["nodeId"] = port["cp_id"]
do_notify(res_type, ret)
set_res_cache(res_cache, res_type, port["cp_id"], ret["id"])