Registering Models with OSGiΒΆ

The OSGi framework activates the OSGiModelRuntime component, who initiates:

  • YangModuleInfoScanner - tracks bundles and attempts to retrieve YangModuleInfo, which it then feeds to YangModuleInfoRegistry

  • YangModuleInfoRegistry - updates SchemaContext each time new YangModuleInfo is added/removed

The diagram below shows the process of registering the modules found in a recently tracked bundle. The YangModuleInfoScanner collects the ModuleInfo-s from that bundle and forwards them to the YangModuleInfoRegistry. From there the ModuleInfoSnapshotResolver checks for existing registration of each YangModuleInfo and if exists, it reuses, otherwise creates a fresh registration with the help of YangTextSchemaContextResolver.

After each ModuleInfo is registered, the YangModuleInfoScanner initiates a snapshot update on the YangModuleInfoRegistry. During the snapshot capture, the EffectiveSchemaContext is updated and preserved within that snapshot.

The diagram below shows all relevant components and their relations.