public class NetconfConnectorModuleFactory extends
org.opendaylight.controller.config.yang.md.sal.connector.netconf.AbstractNetconfConnectorModuleFactory {
- // TODO this should be injected
// Netconf devices have separated schema registry + factory from controller
private final SharedSchemaRepository repository = new SharedSchemaRepository(NAME);
private final SchemaContextFactory schemaContextFactory
final DynamicMBeanWithInstance old, final BundleContext bundleContext) throws Exception {
final NetconfConnectorModule module = (NetconfConnectorModule) super.createModule(instanceName, dependencyResolver,
old, bundleContext);
-
+ module.setInstanceName(instanceName);
module.setBundleContext(bundleContext);
module.setSchemaRegistry(repository);
module.setSchemaContextFactory(schemaContextFactory);
public Module createModule(final String instanceName, final DependencyResolver dependencyResolver, final BundleContext bundleContext) {
final NetconfConnectorModule module = (NetconfConnectorModule) super.createModule(instanceName, dependencyResolver,
bundleContext);
+ module.setInstanceName(instanceName);
module.setBundleContext(bundleContext);
module.setSchemaRegistry(repository);
module.setSchemaContextFactory(schemaContextFactory);