From df6f9b1c6ea95001e8c3273b9e013fb29212c449 Mon Sep 17 00:00:00 2001 From: S237035 Date: Tue, 21 Apr 2020 16:56:07 +0200 Subject: [PATCH] Execute all CVP tasks one by one Change-Id: Ib9fd24eadf4f6342c75cf4bb9b8df0ff24aa6962 Signed-off-by: S237035 --- RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py b/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py index 5c28867e..3621b0ff 100644 --- a/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py +++ b/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py @@ -763,7 +763,6 @@ class AristaSdnConnector(SdnConnectorBase): for s in self.s_api: allLeafConfigured[s] = False allLeafModified[s] = False - tasks = dict() cl_toDelete = [] for s in self.s_api: toDelete_in_cvp = False @@ -801,7 +800,6 @@ class AristaSdnConnector(SdnConnectorBase): self.logger.info("Device {} modify result {}".format(s, res)) for t_id in res[1]['tasks']: if not toDelete_in_cvp: - tasks[t_id] = {'workOrderId': t_id} note_msg = "{}{}{}{}##".format(self.__MANAGED_BY_OSM, self.__SEPARATOR, t_id, @@ -810,15 +808,12 @@ class AristaSdnConnector(SdnConnectorBase): cls_perSw[s][0]['key'], note_msg) cls_perSw[s][0]['note'] = note_msg - else: - delete_tasks = { t_id : {'workOrderId': t_id} } - self.__exec_task(delete_tasks) + tasks = { t_id : {'workOrderId': t_id} } + self.__exec_task(tasks, self.__EXC_TASK_EXEC_WAIT) # with just one configLet assigned to a device, # delete all if there are errors in next loops if not toDelete_in_cvp: allLeafModified[s] = True - if len(tasks) > 0: - self.__exec_task(tasks, self.__EXC_TASK_EXEC_WAIT) if len(cl_toDelete) > 0: self.__configlet_modify(cl_toDelete, delete=True) -- 2.25.1