From: garciadeblas Date: Tue, 24 Jun 2025 13:36:38 +0000 (+0200) Subject: Fix bug 2399: vnf instantiation parameters could have no vdu params X-Git-Tag: v18.0.0~14 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=5e8a418e7120f0c2a295f0a9e3234b7a32a01dd7;p=osm%2FNBI.git Fix bug 2399: vnf instantiation parameters could have no vdu params This change fixes bug 2399 that was reported in relation a multi-site NS deployment. However, this issue could appear in multiple circumstances, whenever there are vnf instantiation parameters and there are no vdu params inside. Change-Id: Id6d3c0b88a2a8478e1908372b24e3d13cdb94dcf Signed-off-by: garciadeblas --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 8074d3a..aa3e51c 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -377,7 +377,7 @@ class NsrTopic(BaseTopic): elif ns_request.get("vnf"): vnf_data = ns_request.get("vnf") for vnf in vnf_data: - for vdu in vnf.get("vdu"): + for vdu in vnf.get("vdu", []): if vdu.get("vim-flavor-name") and vdu.get("vim-flavor-id"): raise EngineException( "Instantiation parameters vim-flavor-name and vim-flavor-id are mutually exclusive"