From: gcalvino Date: Tue, 6 Nov 2018 12:18:31 +0000 (+0100) Subject: NS scenarios without VNFs compatibility X-Git-Tag: v5.0.0~20 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F6851%2F1;p=osm%2FNBI.git NS scenarios without VNFs compatibility Signed-off-by: gcalvino --- 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"])