Fixes bug 1456 by returning default empty list in case no vdu-profile is present 18/10418/1 v9.1.0
authorgarciaale <agarcia@whitestack.com>
Mon, 1 Mar 2021 14:04:50 +0000 (11:04 -0300)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 2 Mar 2021 09:45:57 +0000 (09:45 +0000)
Change-Id: Ia1d65872771f9010f753dfe839cd22ed75d5b02e
Signed-off-by: garciaale <agarcia@whitestack.com>
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.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(