NS scenarios without VNFs compatibility 51/6851/1
authorgcalvino <guillermo.calvinosanchez@altran.com>
Tue, 6 Nov 2018 12:18:31 +0000 (13:18 +0100)
committergcalvino <guillermo.calvinosanchez@altran.com>
Tue, 6 Nov 2018 12:19:22 +0000 (13:19 +0100)
Signed-off-by: gcalvino <guillermo.calvinosanchez@altran.com>
osm_nbi/instance_topics.py

index 29a391c..5d9705b 100644 (file)
@@ -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"])