From 274ed57caed424655e12132fd6feef0a424ec7f2 Mon Sep 17 00:00:00 2001 From: tierno Date: Thu, 4 Apr 2019 13:33:27 +0000 Subject: [PATCH] bug 664: Allow 'pending' for N2VC.GetPrimitiveStatus Change-Id: I530ecfef1883be0156c3daf5ff197e88d272f59a Signed-off-by: tierno --- osm_lcm/ns.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index d538e60..e761d76 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -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" -- 2.25.1