bug 664: Allow 'pending' for N2VC.GetPrimitiveStatus 85/7385/4
authortierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 4 Apr 2019 13:33:27 +0000 (13:33 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Wed, 10 Apr 2019 11:32:24 +0000 (11:32 +0000)
Change-Id: I530ecfef1883be0156c3daf5ff197e88d272f59a
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_lcm/ns.py

index d538e60..e761d76 100644 (file)
@@ -577,6 +577,8 @@ class NsLcm(LcmBase):
                         vdur["vim-id"] = vdur_RO.get("vim_vm_id")
                         if vdur_RO.get("ip_address"):
                             vdur["ip-address"] = vdur_RO["ip_address"].split(";")[0]
+                        else:
+                            vdur["ip-address"] = None
                         vdur["vdu-id-ref"] = vdur_RO.get("vdu_osm_id")
                         vdur["name"] = vdur_RO.get("vim_name")
                         vdur["status"] = vdur_RO.get("status")
@@ -1447,7 +1449,7 @@ class NsLcm(LcmBase):
             )
             while time() - start_primitive_time < self.timeout_primitive:
                 primitive_result_ = await self.n2vc.GetPrimitiveStatus(model_name, primitive_id)
-                if primitive_result_ == "running":
+                if primitive_result_ in ("running", "pending"):
                     pass
                 elif primitive_result_ in ("completed", "failed"):
                     primitive_result = "COMPLETED" if primitive_result_ == "completed" else "FAILED"