From: tierno Date: Wed, 5 Jun 2019 08:28:04 +0000 (+0000) Subject: fix issue updating a vim network in a multisite deployment X-Git-Tag: v6.0.0~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F7611%2F2;p=osm%2FRO.git fix issue updating a vim network in a multisite deployment Change-Id: I27bb7e49b3f97af0d2efdf0b839b3df2fad10f05 Signed-off-by: tierno --- diff --git a/osm_ro/vim_thread.py b/osm_ro/vim_thread.py index 455c625b..7b197dac 100644 --- a/osm_ro/vim_thread.py +++ b/osm_ro/vim_thread.py @@ -707,9 +707,12 @@ class vim_thread(threading.Thread): UPDATE={("number_failed" if task["status"] == "FAILED" else "number_done"): {"INCREMENT": 1}}, WHERE={"uuid": task["instance_action_id"]}) if database_update: + where_filter = {"related": task["related"]} + if task["item"] == "instance_nets" and task["datacenter_vim_id"]: + where_filter["datacenter_tenant_id"] = task["datacenter_vim_id"] self.db.update_rows(table=task["item"], UPDATE=database_update, - WHERE={"related": task["related"]}) + WHERE=where_filter) except db_base_Exception as e: self.logger.error("task={} Error updating database {}".format(task_id, e), exc_info=True)