fix 1201 get kdur from vnfr properly 76/9876/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 9 Oct 2020 12:03:24 +0000 (12:03 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 19 Oct 2020 10:45:43 +0000 (10:45 +0000)
Change-Id: I86d20548bcdcc876b27e3e57c69a347c91aa9825
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_lcm/ns.py

index 61ad281..5b06c18 100644 (file)
@@ -1312,7 +1312,7 @@ class NsLcm(LcmBase):
 
         while nb_tries < 360:
             db_vnfr = self.db.get_one("vnfrs", {"_id": vnfr_id})
-            kdur = next((x for x in get_iterable(db_vnfr, "kdur") if x.get("name") == kdu_name), None)
+            kdur = next((x for x in get_iterable(db_vnfr, "kdur") if x.get("kdu-name") == kdu_name), None)
             if not kdur:
                 raise LcmException("Not found vnfr_id={}, kdu_name={}".format(vnfr_id, kdu_name))
             if kdur.get("status"):