Example #1
0
def deleteDeploymentUnitSet(id):
    isDeleted = DuHelperService.delete_du_set(id)
    return jsonify(
        json.loads(
            dumps({
                "result": "success",
                "message": "DeploymentUnit Set was deleted",
                "data": isDeleted
            }))), 200
Example #2
0
 def handle_delete_operation(self, record, full_sync_flag,
                             directory_to_import_from):
     if full_sync_flag.lower() == "true":
         if record.get("tool_data"):
             return ToolHelperService.delete_tool(
                 record.get("tool_data").get("_id"), False)
         if record.get("du_data"):
             return DuHelperService.delete_du(
                 record.get("du_data").get("_id"), False)
         elif record.get("duset_data"):
             return DuHelperService.delete_du_set(
                 record.get("duset_data").get("_id"), False)
         elif record.get("state_data"):
             return StateHelperService.delete_state(
                 record.get("state_data").get("_id"), False)
     elif full_sync_flag.lower() == "false":
         return {
             "result": "success",
             "message": "Skipping as full_sync_flag is not true"
         }
     raise Exception("Processing:Conditions to process were not found")