Fixes bug 1456 by returning default empty list in case no vdu-profile is present 10/10410/1
authorgarciaale <agarcia@whitestack.com>
Mon, 1 Mar 2021 14:04:50 +0000 (11:04 -0300)
committergarciaale <agarcia@whitestack.com>
Mon, 1 Mar 2021 14:04:50 +0000 (11:04 -0300)
Change-Id: Ia1d65872771f9010f753dfe839cd22ed75d5b02e
Signed-off-by: garciaale <agarcia@whitestack.com>
osm_nbi/descriptor_topics.py

index 0ad3e83..d6b2884 100644 (file)
@@ -625,7 +625,7 @@ class VnfdTopic(DescriptorTopic):
         for df in indata["df"]:
             if "lcm-operations-configuration" in df and "operate-vnf-op-config" in df["lcm-operations-configuration"]:
                 configs = df["lcm-operations-configuration"]["operate-vnf-op-config"].get("day1-2", [])
-                vdus = df["vdu-profile"]
+                vdus = df.get("vdu-profile", [])
                 for vdu in vdus:
                     for config in configs:
                         if config["id"] == vdu["id"] and utils.find_in_list(