From 2269c19bb1fcac5fae647e1f1e32f37f17c96205 Mon Sep 17 00:00:00 2001 From: Anastasios Pandis Date: Thu, 5 Mar 2026 12:54:42 +0200 Subject: [PATCH 1/2] set MonitoringEventSubscriptionRequest to include immediateRep for inline delivery --- src/sunrise6g_opensdk/network/adapters/oai/client.py | 4 +++- src/sunrise6g_opensdk/network/core/schemas.py | 8 ++++++++ tests/network/aoi_location_retrieval_test.py | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/sunrise6g_opensdk/network/adapters/oai/client.py b/src/sunrise6g_opensdk/network/adapters/oai/client.py index cd0e13c..e4d4a79 100644 --- a/src/sunrise6g_opensdk/network/adapters/oai/client.py +++ b/src/sunrise6g_opensdk/network/adapters/oai/client.py @@ -221,10 +221,12 @@ class NetworkManager(BaseNetworkClient): """ expire_time = datetime.now(timezone.utc) + timedelta(hours=1) return schemas.MonitoringEventSubscriptionRequest( - # notification destination is harded coded because it is not used currently but is needed as a placeholder, could later be added as a variable + # notificationDestination is a required placeholder per the 3GPP schema will be used in future; + # location is returned inline (immediateRep=true) so this URL is never called. notificationDestination="http://localhost:8080/callback", monitoringType=schemas.MonitoringType.LOCATION_REPORTING, maximumNumberOfReports=1, + immediateRep=True, monitorExpireTime=expire_time, ) diff --git a/src/sunrise6g_opensdk/network/core/schemas.py b/src/sunrise6g_opensdk/network/core/schemas.py index c7ee254..6bfa986 100644 --- a/src/sunrise6g_opensdk/network/core/schemas.py +++ b/src/sunrise6g_opensdk/network/core/schemas.py @@ -355,6 +355,14 @@ class MonitoringEventSubscriptionRequest(BaseModel): None, description="Indicates whether the request is for Current Location, Initial Location, or Last Known Location.", ) + immediateRep: bool | None = Field( + None, + description=( + "When set to true, requests immediate inline delivery of the monitoring event " + "report in the POST response body (3GPP TS 29.522). Required for synchronous " + "location retrieval on spec-compliant NEFs." + ), + ) repPeriod: DurationSec | None = Field( None, description="Identifies the periodic time for the event reports." ) diff --git a/tests/network/aoi_location_retrieval_test.py b/tests/network/aoi_location_retrieval_test.py index d098043..0f1c9fc 100644 --- a/tests/network/aoi_location_retrieval_test.py +++ b/tests/network/aoi_location_retrieval_test.py @@ -70,6 +70,8 @@ class TestCamaraToOai3gppTransformation: assert result.externalId == "imsi-001010000000001" assert result.monitoringType == MonitoringType.LOCATION_REPORTING assert result.maximumNumberOfReports == 1 + # immediateRep must be True — required for inline synchronous response (3GPP TS 29.522) + assert result.immediateRep is True # OAI adapter must NOT set locationType (NEF rejects it) assert result.locationType is None # msisdn should not be set (OAI uses externalId) @@ -82,6 +84,8 @@ class TestCamaraToOai3gppTransformation: ) json_str = result.model_dump_json(exclude_none=True, by_alias=True) assert '"externalId":"imsi-001010000000001"' in json_str.replace(" ", "") + # immediateRep must appear in the JSON sent to the NEF + assert '"immediateRep":true' in json_str.replace(" ", "") # locationType must NOT appear in the JSON assert "locationType" not in json_str -- GitLab From fc8bd7ea7835e515e931c5186bea256b96764caa Mon Sep 17 00:00:00 2001 From: Anastasios Pandis Date: Thu, 5 Mar 2026 13:07:06 +0200 Subject: [PATCH 2/2] version bump to 1.1.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 937bbb7..fde5079 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "sunrise6g-opensdk" -version = "1.1.0" +version = "1.1.1" description = "Open source SDK to abstract CAMARA/GSMA Transformation Functions (TFs) for Edge Cloud platforms, 5G network cores and Open RAN solutions." keywords = [ "Federation", -- GitLab