diff options
author | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-06-03 09:13:55 +0800 |
---|---|---|
committer | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-06-03 09:20:40 +0800 |
commit | fccf3487362c1497cab3a793fe70ca51007d5ce5 (patch) | |
tree | ceec196b1efd2e6e963a217d41163c0fa009e964 /lcm | |
parent | c71175866d16bedda627b47acde2d46f33559127 (diff) |
add codes for exception
multicloud return enableDHCP empty; cp in VNFD does not config the vl
Change-Id: Id6ea879e8fd1d042f932b5add09d29f2db52f270
Issue-ID: VFC-1406
Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r-- | lcm/lcm/nf/biz/common.py | 2 | ||||
-rw-r--r-- | lcm/lcm/pub/vimapi/adaptor.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lcm/lcm/nf/biz/common.py b/lcm/lcm/nf/biz/common.py index bd8411d4..c4ddf3e6 100644 --- a/lcm/lcm/nf/biz/common.py +++ b/lcm/lcm/nf/biz/common.py @@ -68,7 +68,7 @@ def subnet_save(job_id, nf_inst_id, ret): networkid=ignore_case_get(ret, "networkId"), cidr=ignore_case_get(ret, "cidr"), ipversion=ignore_case_get(ret, "ipversion"), - isdhcpenabled=ignore_case_get(ret, "enableDhcp"), + isdhcpenabled=ignore_case_get(ret, "enableDhcp", 0), gatewayip=ignore_case_get(ret, "gatewayIp"), dnsNameservers=ignore_case_get(ret, "dnsNameservers"), hostRoutes=ignore_case_get(ret, "hostRoutes"), diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py index 83727f2d..ae18863a 100644 --- a/lcm/lcm/pub/vimapi/adaptor.py +++ b/lcm/lcm/pub/vimapi/adaptor.py @@ -252,6 +252,8 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type): raise VimException(err_msg % (port_ref_vdu_id, port["cp_id"]), ERR_CODE) network_id = ignore_case_get(port, "networkId") subnet_id = ignore_case_get(port, "subnetId") + if port["vl_id"] == "": + return if not network_id: network_id = get_res_id(res_cache, RES_NETWORK, port["vl_id"]) subnet_id = get_res_id(res_cache, RES_SUBNET, port["vl_id"]) |