Support establish-subscription#2637
Conversation
Add support for create-notification-stream by adding the missing RPC implementation and fixing the strict schema validation in Lighty.io which enables all Yang features by default. This inadvertently enabled the replay feature in ietf-subscribed-notifications, making the replay-log-creation-time leaf strictly mandatory. Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Add support for subscribe-device-notification to enable all of notification and subscription features to work in lighty. Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Add support for establish-subscription to enable all of notification and subscription features to work in lighty. Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
There was a problem hiding this comment.
Code Review
This pull request integrates support for RFC-8639 subscribed notifications and device notifications. It updates LightyControllerImpl to load and register YangFeatureProvider services, adds the rfc8639-impl dependency, registers notification-related YANG modules in the sample configuration, and configures MdsalRestconfServer with notification RPCs in CommunityRestConf. Feedback suggests explicitly passing the class loader to ServiceLoader.load in LightyControllerImpl to prevent potential loading issues in modular or multi-classloader environments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| //INIT schema context | ||
| this.snapshotResolver = new ModuleInfoSnapshotResolver("binding-dom-codec", yangParserFactory); | ||
| for (YangFeatureProvider featureProvider : ServiceLoader.load(YangFeatureProvider.class)) { |
There was a problem hiding this comment.
Using ServiceLoader.load(Class) without specifying a class loader defaults to using the Thread Context Class Loader (TCCL). In modular, containerized, or multi-classloader environments (such as OSGi or custom runtime environments where Lighty is often embedded), the TCCL might be null or set to a class loader that does not have access to the YangFeatureProvider implementations.\n\nTo ensure robust and predictable service loading, it is highly recommended to explicitly pass the class loader that loaded the interface (i.e., YangFeatureProvider.class.getClassLoader()).
| for (YangFeatureProvider featureProvider : ServiceLoader.load(YangFeatureProvider.class)) { | |
| for (YangFeatureProvider featureProvider : ServiceLoader.load(YangFeatureProvider.class, YangFeatureProvider.class.getClassLoader())) { |
No description provided.