RAN analytics for the uRIC near-RT RIC
y1prod adds the O-RAN Y1 interface to the uric near‑RT RIC. It turns E2SM-KPM measurements into RAN performance analytics and serves them to authorized consumers over mutual TLS and OAuth 2.0.
git clone https://github.com/openwiran/y1prod
- Python ≥ 3.9standard library
- uricthe only dependency
- Apache 2.0license
Scroll sideways to see the uric lane.
Four parts, one standard library
Everything runs on the Python standard library. Only the xApp needs uric, which brings pycrate along.
Y1 producer
y1-producerServes
Y1_RAI_SubscriptionandY1_RAI_Queryover HTTPS, with an embedded OAuth 2.0 authorization server and the RAN performance analytics engine.Collector xApp
y1-rai-collectorRuns inside uric or as its own process. It subscribes to E2SM-KPM UE measurements on every E2 node and feeds them to the producer.
Management dashboard
localhost:8090Tracks consumers, connections, tokens, subscriptions, RAI targets and data sources. It reuses the uric dashboard's look and components.
Sample consumer
y1-consumerA separate process that talks to the producer over Y1 only, with its own mutual TLS notification server and a reusable client library.
Built from the ETSI Y1 specifications
The producer follows the ETSI publications of the O-RAN WG3 Y1 specifications, and the 3GPP SBI conventions they build on.
- Y1GAP ETSI TS 104 302 V1.1.0
- General aspects and principles: the services and operations, the RAI types, and the TCP, TLS, HTTP/1.1 and JSON protocol stack.
- Y1AP ETSI TS 104 303 V1.1.0
Y1_RAI_Subscription1.0.0 andY1_RAI_Query1.0.0, using the HTTP REST with JSON solution set.- Y1TD ETSI TS 104 304 V2.0.0
- The RAI type RAN performance analytics 1.1.0, with all eight
RaiContentsattributes, filters and distributions. - Security ETSI TS 104 104 V9.1.0
- REQ-SEC-Y1-1 to 6: mutual TLS with X.509v3, OAuth 2.0 scopes, certificate-bound tokens, topology hiding, input validation and rate limits.
- 3GPP SBI TS 29.122, 29.571, 29.500
ProblemDetailserror handling, common data types and causes, as referenced by Y1AP and Y1TD.- Topology hiding
- Y1 reports name UEs and slices only. No E2 node, cell or RIC information ever leaves the operator domain.
From clone to live notifications
Start each component in its own terminal. The producer dashboard opens at http://localhost:8090, the uric dashboard at http://localhost:8080.
-
Install
Create a virtual environment and install the package. This pulls in uric and pycrate from GitHub.
python3 -m venv .venv && . .venv/bin/activate git clone https://github.com/openwiran/y1prod && cd y1prod pip install -e . -
Create a development PKI and start the producer
The CA and certificates are for testing only. Y1 listens on :8443, the dashboard on :8090.
y1-pki --out pki --consumer consumer-1 --consumer consumer-2 y1-producer --config examples/producer.json -
Start uric with the collector xApp and some gNBs
With
--churn 0the simulated UEs keep stable identifiers, so the consumer can keep naming them.uric --config examples/uric-y1.json uric-sim --nodes 2 --ues 3 --churn 0 -
Subscribe as a Y1 consumer
Ask for the statistics of the last 2 s and a prediction for the next period, every 2 s, with a query every 10 notifications.
y1-consumer --api-root https://localhost:8443 --pki pki \ --client-id consumer-1 --client-secret consumer-1-secret \ --ue 1@00101/010040 --ue 2@00101/010040#1 \ --period-ms 2000 --validity=-2000:2000 --validity 1000:2000 --query-every 10
Speak Y1, the standard way
Resource URIs, status codes, headers and bodies follow Y1AP. A negative relative validity period asks for statistics, a positive one for a prediction with a confidence value.
POST {apiRoot}/Y1_RAI_Subscription/v1/subscriptions
{
"raiType": "RAN performance analytics",
"raiTypeVersion": "1.1.0",
"targetEntities": [
{"ueId": {"amfUeNgapId": 1,
"guami": {"plmnId": {"mcc": "001", "mnc": "01"},
"amfId": "010040"}},
"snssai": {"sst": 1}}
],
"expectedValidityPeriodsRelative": [
{"startTimeRelative": -2000, "durationMilliSecond": 2000},
{"startTimeRelative": 1000, "durationMilliSecond": 2000}
],
"filterParameters": {"analyticsSubsetFilters": [
"AVG_RLC_THROUGHPUT_DL", "AVG_PACKET_DELAY_DL"]},
"notificationCriteria": {"notificationMethod": "PERIODIC",
"notificationPeriod": 2000},
"notificationTargetAddress":
"https://consumer.example:9443/y1/notifications"
}
# → 201 Created
# Location: {apiRoot}/Y1_RAI_Subscription/v1/subscriptions/BWD5UzK6g5gCAE84
Operations
POST /oauth2/token: client credentials grantPOST,PUT,DELETEon subscriptions: RAI_Subscribe and RAI_UnsubscribeGET /Y1_RAI_Query/v1/analytics: RAI_QueryPOST {notificationTargetAddress}: RAI_Notify, with307/308redirects followed
Security on every request
- Mutual TLS with X.509v3 certificates, TLS 1.2 and 1.3
- Access tokens bound to the client certificate (RFC 8705)
- Per-scope access, per-consumer rate limits, and a security event for every failure
- Another consumer's subscription answers
404, so its existence stays hidden
Statistics for the past
Measurements whose granularity period overlaps the validity period are aggregated. Throughput is RLC volume over the period, delay is the sum of PDCP, RLC and air interface delay, and distributions are histograms over binRangeList.
Predictions for the future
Each attribute is extrapolated with a least-squares trend over the last 30 s, blended towards the mean as the horizon grows. confidence falls with the fit error and the prediction horizon.
Know who is asking for what
The operator dashboard follows the producer through a live event stream. Its management API listens on localhost and is not part of Y1.
- OverviewCounters, a Y1 topology graph from producer to consumers to subscriptions, notification round trip p50/p95/p99
- Y1 consumersState, connections, certificate, scopes and tokens. Register, disable, revoke or remove a consumer
- SubscriptionsCriteria, targets, delivery statistics and the last notification, with termination by cause
- RAI targetsUEs and UE/slice pairs with trends, current statistics, a prediction and their subscribers
- Data sourcesThe xApp instances that feed the producer
- EventsConnections, tokens, subscriptions, failed notifications and security events
Compliance at a glance
The protocol conformance suite runs against a live producer, and the end-to-end suite runs uric, the simulator, the xApp, the producer and the consumer in separate processes.
| Requirement | Reference | Status |
|---|---|---|
| Create, update and delete subscriptions | 6.2.2.1 | 201 with Location, 200, 204; tested |
| RAI_Notify and termination | 6.2.2.1.4 | terminationIndication with cause UNKNOWN or OVERLOAD; tested |
| Periodic notifications | NotificationCriteria | PERIODIC with period and start time; tested |
| RAI_Query | 6.3 | Targets, validity periods and filters; tested |
| ProblemDetails errors | TS 29.122 5.2.6 | 400 to 503, invalidParams with JSON Pointers; tested |
| RAN performance analytics 1.1.0 | Y1TD | All eight attributes, UE and UE/slice targets, filters; tested |
| Mutual TLS and OAuth 2.0 | REQ-SEC-Y1-1, 2, 5 | Scopes and certificate-bound tokens; tested |
| Topology hiding | REQ-SEC-Y1-6 | No node, cell or RIC information in reports |
| Event-triggered notifications | Y1TD 6.2.2.2.5 | Rejected with 400: no trigger event is defined for this RAI type |
| HTTP/2 | Y1GAP 7.2.5 (should) | Not implemented |
Known limits
Worth knowing before you expose it to a real Application Function.
- HTTP/1.1 onlyThe standard library has no HTTP/2, so the producer uses HTTP/1.1 with persistent connections.
- Embedded authorization serverTokens are HS256 JWTs. To use an external server, configure the same issuer, audience and signing key.
- Subscriptions live in memoryThey are terminated when the producer stops. Consumers, revocations and disabled flags persist through
state_file.
Open Y1 on your laptop today
Clone the repository, start the producer, uric and the simulator, and watch notifications reach the sample consumer while the dashboard tracks every token and subscription.