diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-02-23 19:45:11 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-02-23 19:45:11 +0800 |
commit | 97f8569b9781e705851f65c51eb7b85242a9037d (patch) | |
tree | 14d7fcbdbe3519116af9cd55388c163109fd12da /lcm/lcm/pub/vimapi/adaptor.py | |
parent | f74e80669eb2ea45755fd7b111bfa7852c4a03f2 (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/adaptor.py')
-rw-r--r-- | lcm/lcm/pub/vimapi/adaptor.py | 3 |
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"]) |