From 19f1afb25a1779be57a05e75030404a952220f26 Mon Sep 17 00:00:00 2001 From: Mike Marchetti Date: Fri, 16 Jun 2017 11:26:49 -0400 Subject: [PATCH] Bug 299 fixed scenario/scenario-instance were using different different identifiers for a VNF (id vs. name) Signed-off-by: Mike Marchetti --- models/openmano/python/rift/openmano/rift2openmano.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/openmano/python/rift/openmano/rift2openmano.py b/models/openmano/python/rift/openmano/rift2openmano.py index e037093c..44e80b63 100755 --- a/models/openmano/python/rift/openmano/rift2openmano.py +++ b/models/openmano/python/rift/openmano/rift2openmano.py @@ -339,7 +339,8 @@ def rift2openmano_vnfd_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids,rift_vnfd_id= openmano_vnfd_id = openmano_vnfd_ids.get(rift_vnfd_id,None) for rvnfd_id in rift_nsd.constituent_vnfds: if rvnfd_id.vnfd_id_ref == rift_vnfd_id: - topology["nodes"][rift_vnfd_id+'__'+str(rvnfd_id.member_vnf_index)] = { + rift_vnfd = rift_vnfds[rift_vnfd_id] + topology["nodes"][rift_vnfd.name +'__'+str(rvnfd_id.member_vnf_index)] = { "type": "VNF", "vnf_id": openmano_vnfd_id } @@ -374,7 +375,7 @@ def rift2openmano_vnfd_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids,rift_vnfd_id= topology["connections"][vld.name]["type"] = "link" # Vnf ref is the vnf name with the member_vnf_idx appended member_idx = vnfd_cp.member_vnf_index_ref - vnf_ref = rift_vnfd_id + "__" + str(member_idx) + vnf_ref = vnfd.name + "__" + str(member_idx) topology["connections"][vld.name]["nodes"].append( { vnf_ref: vnfd_cp.vnfd_connection_point_ref -- 2.17.1