Fix Bug 2009 use existing volumes as instantiation parameters 80/12080/2
authoraticig <gulsum.atici@canonical.com>
Wed, 18 May 2022 15:55:23 +0000 (18:55 +0300)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 20 Jun 2022 13:41:30 +0000 (15:41 +0200)
Change-Id: I8bed540aea41c23eef5ff4bf25f7ea03d77ba064
Signed-off-by: aticig <gulsum.atici@canonical.com>
osm_nbi/instance_topics.py

index d371216..62df4f8 100644 (file)
@@ -1488,7 +1488,7 @@ class NsLcmOpTopic(BaseTopic):
                 if in_vdu["id"] == vdu["id"]:
                     for volume in get_iterable(in_vdu.get("volume")):
                         for volumed in get_iterable(vdu.get("virtual-storage-desc")):
-                            if volumed["id"] == volume["name"]:
+                            if volumed == volume["name"]:
                                 break
                         else:
                             raise EngineException(
@@ -1508,7 +1508,7 @@ class NsLcmOpTopic(BaseTopic):
                         ):
                             vdu_if_names.add(iface.get("name"))
 
-                    for in_iface in get_iterable(in_vdu["interface"]):
+                    for in_iface in get_iterable(in_vdu.get("interface")):
                         if in_iface["name"] in vdu_if_names:
                             break
                         else: