Skip to content
Snippets Groups Projects
Commit 781ce73b authored by Shahithya Y's avatar Shahithya Y Committed by garciadeblas
Browse files

Force delete operation passing force option in kafka


Change-Id: I43f0db196ad196aea0a29a0cb567b6cbf3e69cb5
Signed-off-by: default avataryshah <shahithya.y@tataelxsi.co.in>
parent 5f41d78f
No related branches found
No related tags found
No related merge requests found
Pipeline #18681 passed with stage
in 3 minutes and 55 seconds
......@@ -330,7 +330,7 @@ class ProfileTopic(ACMTopic):
def delete_extra_before(self, session, _id, db_content, not_send_msg=None):
op_id = self.common_delete(_id, db_content)
return {"profile_id": _id, "operation_id": op_id}
return {"profile_id": _id, "operation_id": op_id, "force": session["force"]}
def delete_profile(self, session, _id, dry_run=False, not_send_msg=None):
item_content = self.db.get_one(self.topic, {"_id": _id})
......
......@@ -557,7 +557,7 @@ class ClusterTopic(ACMTopic):
def delete_extra_before(self, session, _id, db_content, not_send_msg=None):
op_id = self.common_delete(_id, db_content)
return {"cluster_id": _id, "operation_id": op_id}
return {"cluster_id": _id, "operation_id": op_id, "force": session["force"]}
def delete(self, session, _id, dry_run=False, not_send_msg=None):
filter_q = self._get_project_filter(session)
......@@ -969,7 +969,11 @@ class KsusTopic(ACMTopic):
_id_list.append(_id)
if _id_list:
data = {"ksus_list": _id_list, "operation_id": op_id}
data = {
"ksus_list": _id_list,
"operation_id": op_id,
"force": session["force"],
}
self._send_msg("delete", data, not_send_msg)
return op_id
......@@ -1133,7 +1137,9 @@ class OkaTopic(DescriptorTopic, ACMOperationTopic):
)
self.db.set_one(self.topic, {"_id": item_content["_id"]}, item_content)
self._send_msg(
"delete", {"oka_id": _id, "operation_id": op_id}, not_send_msg=not_send_msg
"delete",
{"oka_id": _id, "operation_id": op_id, "force": session["force"]},
not_send_msg=not_send_msg,
)
return op_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment