Gateway xApps
y1-termination
An O-RAN Y1 termination — the RIC's northbound RAN Analytics Information (RAI) exposure point. Python (FastAPI).
It bridges two interfaces: it consumes E2SM-KPM southbound and re-exposes the derived analytics over a Y1 REST API (HTTP + JSON, OpenAPI 3.0) northbound — so external, non-E2 consumers can read RAN analytics without speaking E2AP.
- SM (southbound): KPM REPORT Style 4 (per-UE), created demand-first from Y1 consumer subscriptions and queries.
- Northbound: a Y1 REST server (not an E2 SM) running in a daemon thread alongside the RIC dispatch loop.
- What it does: an
E2SubscriptionManagercreates or reuses a KPM subscription per demanded UE — reference-counted, with a query-hold TTL (~30 s), unsubscribing when demand drops to zero. KPM indications feed a sharedMeasurementStore. Y1 consumers get periodic notification POSTs andGET /analyticsreads, plusPOST/DELETE /subscriptionsCRUD with RFC 7807 problem-detail errors. It targets full O-RAN Y1 compliance (OAuth2 / HTTPS northbound, TLS / auth southbound). - Config:
xapp.kpm.{report_period_ms, granularity_ms, snssai_sst},xapp.http.port(8080),xapp.subscription.backend(memory|redis) with optionalxapp.subscription.redis.{url, key_prefix, ttl_seconds}. The OpenAPI specs live under the xApp'sspecs/.
Demand-first subscriptions
Unlike the monitor xApps, y1-termination does not subscribe eagerly on node discovery — it subscribes only when a Y1 consumer asks for a UE's analytics, and tears the subscription down when the last consumer goes away. This keeps the southbound KPM load proportional to actual northbound demand.
The example to study for building a northbound gateway — turning E2/SM data into a different, consumer-facing API — rather than acting on the RAN directly.