From: Dominik Fleischmann Date: Thu, 12 Dec 2019 16:26:49 +0000 (+0100) Subject: Call k8sclusterjuju.install with ensure future X-Git-Tag: v7.0.1rc1~9 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=4706e583e18c0c3eaf5480998248c298b78e23da;p=osm%2FLCM.git Call k8sclusterjuju.install with ensure future This fixes the bug 971, due to the function not being called like this the type of the task variable wasn't correct for the rest of execution. https://osm.etsi.org/bugzilla/show_bug.cgi?id=971 Change-Id: I47266a04332579cb7ee54e5d45189164ccca7b40 Signed-off-by: Dominik Fleischmann --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index de1c6a0..87eaecd 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -1673,9 +1673,11 @@ class NsLcm(LcmBase): params=desc_params, db_dict=db_dict, timeout=3600) ) else: - task = self.k8sclusterjuju.install(cluster_uuid=cluster_uuid, kdu_model=kdumodel, - atomic=True, params=desc_params, - db_dict=db_dict, timeout=600) + task = asyncio.ensure_future( + self.k8sclusterjuju.install(cluster_uuid=cluster_uuid, kdu_model=kdumodel, + atomic=True, params=desc_params, + db_dict=db_dict, timeout=600) + ) pending_tasks[task] = "_admin.deployed.K8s.{}.".format(index) index += 1