X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Flcm_utils.py;h=6e9c7f6186cdf33d100307ccb29842e87fbe2998;hb=3ff2325f97dda222d286d0d8ceb720de8b1a537c;hp=d91eaed76813aca3bfcc993ebe5a12f0bf7da89b;hpb=f0af5e6329b1cf966707d98a35281f8cf284aff4;p=osm%2FLCM.git diff --git a/osm_lcm/lcm_utils.py b/osm_lcm/lcm_utils.py index d91eaed..6e9c7f6 100644 --- a/osm_lcm/lcm_utils.py +++ b/osm_lcm/lcm_utils.py @@ -240,7 +240,7 @@ class LcmBase: Returns: hex digest (str): The hash of the charm file """ - filehash = hashlib.md5() + filehash = hashlib.sha256() with open(zipped_file, mode="rb") as file: contents = file.read() filehash.update(contents) @@ -571,17 +571,19 @@ class TaskRegistry(LcmBase): """ Cancel all active tasks of a concrete ns, nsi, vim_account, sdn identified for _id. If op_id is supplied only this is cancelled, and the same with task_name + :return: cancelled task to be awaited if needed """ if not self.task_registry[topic].get(_id): return for op_id in reversed(self.task_registry[topic][_id]): if target_op_id and target_op_id != op_id: continue - for task_name, task in self.task_registry[topic][_id][op_id].items(): + for task_name, task in list(self.task_registry[topic][_id][op_id].items()): if target_task_name and target_task_name != task_name: continue # result = task.cancel() + yield task # if result: # self.logger.debug("{} _id={} order_id={} task={} cancelled".format(topic, _id, op_id, task_name))