From 2e162d981325918d87f959f04e45eb2395b154b4 Mon Sep 17 00:00:00 2001 From: Ankur Malik Date: Sun, 23 Nov 2025 23:30:21 -0500 Subject: [PATCH] Update mlg_lookup block and schemas --- block.py | 7 ++++++- request_schema.json | 4 ++++ response_schema.json | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/block.py b/block.py index 151fe81..d52f13d 100644 --- a/block.py +++ b/block.py @@ -35,12 +35,15 @@ def __main__( deviceid: str, fuzzydeviceid: str, application_email_address: str, - hd_score_m1: float + hd_score_m1: float, + hd_score_iso_m2: float ) -> dict: namespace = os.getenv("NAMESPACE", "staging") base_url = "http://centurion-mlg.default.svc.cluster.local:8080/api/v1/clusters" + # base_url = "http://localhost:8080//api/v1/clusters" cluster_name = get_cluster_name(namespace) + # cluster_name = "cluster_deviceid_email_fuzzydevice_direct_new" url_post = f"{base_url}/{cluster_name}/records" url_get = f"{base_url}/{cluster_name}/record" url_get_for_graph = f"{base_url}/{cluster_name}/graph" @@ -83,6 +86,8 @@ def __main__( if current_hd_score is None: post_process_output["hd_score_m1"] = hd_score_m1 + post_process_output["hd_score_iso_m2"] = hd_score_iso_m2 + logger.info("Post Processed Record") logger.info(post_process_output) diff --git a/request_schema.json b/request_schema.json index 8277bcc..94bf80b 100644 --- a/request_schema.json +++ b/request_schema.json @@ -25,6 +25,10 @@ "hd_score_m1": { "type": ["number", "null"], "description": "HD Score M1 value associated with the application." + }, + "hd_score_iso_m2": { + "type": ["number", "null"], + "description": "HD Score M2 Isotonic value associated with the application." } }, "required": [] diff --git a/response_schema.json b/response_schema.json index 36f14ad..37f3a86 100644 --- a/response_schema.json +++ b/response_schema.json @@ -10,6 +10,10 @@ "type": ["number", "null"], "description": "HD fraud score M1." }, + "hd_score_iso_m2": { + "type": ["number", "null"], + "description": "HD fraud score M2." + }, "connected_application_keys": { "type": "array", "items": {