diff options
author | maopeng zhang <zhang.maopeng1@zte.com.cn> | 2019-05-08 09:34:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-08 09:34:15 +0000 |
commit | 3f4119e9513002395f612b440710b1996696fb2a (patch) | |
tree | 056f2b1c485f2f067b318a2faeda3cd1e811d0db | |
parent | ed8bccc894bbd4bbc9d75f5ff459ce20dcb92e1b (diff) | |
parent | 64556d198cf39ce45ebf6fa6ac93787b9c2e4f42 (diff) |
Merge "Fix bug for ns inst"
-rw-r--r-- | lcm/ns/biz/ns_instant.py | 5 | ||||
-rw-r--r-- | lcm/ns/tests/data/vnfm_in_aai.json | 2 | ||||
-rw-r--r-- | lcm/ns/tests/data/vnfm_list_in_aai.json | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/lcm/ns/biz/ns_instant.py b/lcm/ns/biz/ns_instant.py index c16a21b1..1340790a 100644 --- a/lcm/ns/biz/ns_instant.py +++ b/lcm/ns/biz/ns_instant.py @@ -97,7 +97,10 @@ class InstantNSService(object): if isinstance(vnfm_type_temp, list): vnfm_type = vnfm_type_temp[0] vimid = self.get_vnf_vim_id(vim_id, location_constraints, vnfd_id) - vnfm_info = extsys.select_vnfm(vnfm_type=vnfm_type, vim_id=vimid) + s_vimid = vimid + if isinstance(vimid, dict): + s_vimid = "%s_%s" % (vimid["cloud_owner"], vimid["cloud_regionid"]) + vnfm_info = extsys.select_vnfm(vnfm_type=vnfm_type, vim_id=s_vimid) params_vnf.append({ "vnfProfileId": vnf["vnf_id"], diff --git a/lcm/ns/tests/data/vnfm_in_aai.json b/lcm/ns/tests/data/vnfm_in_aai.json index 6b5acc8b..3d5ff47c 100644 --- a/lcm/ns/tests/data/vnfm_in_aai.json +++ b/lcm/ns/tests/data/vnfm_in_aai.json @@ -1,6 +1,6 @@ { "type": "gvnfm", - "vim-id": {"cloud_owner": "VCPE", "cloud_regionid": "RegionOne"}, + "vim-id": "VCPE_RegionOne", "vnfm-id": "4", "certificate-url": "http://127.0.0.0/ztevnfm/v1/auth", "esr-system-info-list": { diff --git a/lcm/ns/tests/data/vnfm_list_in_aai.json b/lcm/ns/tests/data/vnfm_list_in_aai.json index a1a3678e..3db3a1a6 100644 --- a/lcm/ns/tests/data/vnfm_list_in_aai.json +++ b/lcm/ns/tests/data/vnfm_list_in_aai.json @@ -1,7 +1,7 @@ { "esr-vnfm": [{ "type": "gvnfm", - "vim-id": {"cloud_owner": "VCPE", "cloud_regionid": "RegionOne"}, + "vim-id": "VCPE_RegionOne", "vnfm-id": "4", "certificate-url": "http://127.0.0.0/ztevnfm/v1/auth", "esr-system-info-list": { |