Loading pyproject.toml +1 −1 Original line number Diff line number Diff line Loading @@ -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", Loading src/sunrise6g_opensdk/network/adapters/oai/client.py +3 −1 Original line number Diff line number Diff line Loading @@ -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, ) Loading src/sunrise6g_opensdk/network/core/schemas.py +8 −0 Original line number Diff line number Diff line Loading @@ -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." ) Loading tests/network/aoi_location_retrieval_test.py +4 −0 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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 Loading Loading
pyproject.toml +1 −1 Original line number Diff line number Diff line Loading @@ -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", Loading
src/sunrise6g_opensdk/network/adapters/oai/client.py +3 −1 Original line number Diff line number Diff line Loading @@ -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, ) Loading
src/sunrise6g_opensdk/network/core/schemas.py +8 −0 Original line number Diff line number Diff line Loading @@ -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." ) Loading
tests/network/aoi_location_retrieval_test.py +4 −0 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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 Loading