X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fvim_sdn.py;h=cf836bf6405ff2ed5bfc80ba27c0c34b207f083f;hb=8dd7de5f8340094b99def2a45ade865f00693e9d;hp=e41d217501560d036aa31f25340b7b732a48ac01;hpb=59d22d2291db050aa17573d994f5274f67ae1212;p=osm%2FLCM.git diff --git a/osm_lcm/vim_sdn.py b/osm_lcm/vim_sdn.py index e41d217..cf836bf 100644 --- a/osm_lcm/vim_sdn.py +++ b/osm_lcm/vim_sdn.py @@ -124,7 +124,9 @@ class VimLcm(LcmBase): step = "Waiting for related tasks to be completed: {}".format(task_name) self.logger.debug(logging_text + step) # TODO write this to database - await asyncio.wait(task_dependency, timeout=3600) + _, pending = await asyncio.wait(task_dependency, timeout=3600) + if pending: + raise LcmException("Timeout waiting related tasks to be completed") if db_vim.get("_admin") and db_vim["_admin"].get("deployed") and db_vim["_admin"]["deployed"].get("RO"): if vim_content.get("config") and vim_content["config"].get("sdn-controller"): @@ -137,7 +139,9 @@ class VimLcm(LcmBase): step = "Waiting for related tasks to be completed: {}".format(task_name) self.logger.debug(logging_text + step) # TODO write this to database - await asyncio.wait(task_dependency, timeout=3600) + _, pending = await asyncio.wait(task_dependency, timeout=3600) + if pending: + raise LcmException("Timeout waiting related tasks to be completed") if db_sdn.get("_admin") and db_sdn["_admin"].get("deployed") and db_sdn["_admin"]["deployed"].get( "RO"):