From 4f269dd7d9798c340f74c0c265379427d0dc02b9 Mon Sep 17 00:00:00 2001 From: gcalvino Date: Tue, 6 Nov 2018 13:18:31 +0100 Subject: [PATCH] NS scenarios without VNFs compatibility Signed-off-by: gcalvino --- osm_nbi/instance_topics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 29a391c..5d9705b 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -132,7 +132,7 @@ class NsrTopic(BaseTopic): # Create VNFR needed_vnfds = {} - for member_vnf in nsd["constituent-vnfd"]: + for member_vnf in nsd.get("constituent-vnfd", ()): vnfd_id = member_vnf["vnfd-id-ref"] step = "getting vnfd id='{}' constituent-vnfd='{}' from database".format( member_vnf["vnfd-id-ref"], member_vnf["member-vnf-index"]) -- 2.25.1