*/
package org.opendaylight.controller.config.yang.md.sal.connector.netconf;
+import static com.google.common.base.Preconditions.checkArgument;
import static org.opendaylight.controller.config.api.JmxAttributeValidationException.checkCondition;
import static org.opendaylight.controller.config.api.JmxAttributeValidationException.checkNotNull;
import org.opendaylight.netconf.sal.connect.netconf.LibraryModulesSchemas;
import org.opendaylight.netconf.sal.connect.netconf.NetconfDevice;
import org.opendaylight.netconf.sal.connect.netconf.NetconfDeviceBuilder;
-import org.opendaylight.netconf.sal.connect.netconf.NetconfStateSchemas;
+import org.opendaylight.netconf.sal.connect.netconf.NetconfStateSchemasResolverImpl;
import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator;
import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfSessionPreferences;
import org.opendaylight.netconf.sal.connect.netconf.listener.UserPreferences;
schemaResourcesDTOs.put(DEFAULT_CACHE_DIRECTORY,
new NetconfDevice.SchemaResourcesDTO(DEFAULT_SCHEMA_REPOSITORY,
DEFAULT_SCHEMA_CONTEXT_FACTORY,
- new NetconfStateSchemas.NetconfStateSchemasResolverImpl()));
+ new NetconfStateSchemasResolverImpl()));
DEFAULT_SCHEMA_REPOSITORY.registerSchemaSourceListener(DEFAULT_CACHE);
DEFAULT_SCHEMA_REPOSITORY.registerSchemaSourceListener(
TextToASTTransformer.create(DEFAULT_SCHEMA_REPOSITORY, DEFAULT_SCHEMA_REPOSITORY));
if (schemaResourcesDTO == null) {
schemaResourcesDTO = new NetconfDevice.SchemaResourcesDTO(schemaRegistry, schemaContextFactory,
- new NetconfStateSchemas.NetconfStateSchemasResolverImpl());
+ new NetconfStateSchemasResolverImpl());
}
final NetconfDevice device = new NetconfDeviceBuilder()
.setSalFacade(salFacade)
.build();
+ if (getConcurrentRpcLimit() < 1) {
+ LOG.info("Concurrent rpc limit is smaller than 1, no limit will be enforced for device {}", id);
+ }
+
final NetconfDeviceCommunicator listener = userCapabilities.isPresent() ?
new NetconfDeviceCommunicator(id, device,
- new UserPreferences(userCapabilities.get(), getYangModuleCapabilities().getOverride())):
- new NetconfDeviceCommunicator(id, device);
+ new UserPreferences(userCapabilities.get(), getYangModuleCapabilities().getOverride()), getConcurrentRpcLimit()):
+ new NetconfDeviceCommunicator(id, device, getConcurrentRpcLimit());
if (shouldSendKeepalive()) {
((KeepaliveSalFacade) salFacade).setListener(listener);
createDeviceFilesystemCache(moduleSchemaCacheDirectory);
repository.registerSchemaSourceListener(deviceCache);
return new NetconfDevice.SchemaResourcesDTO(repository, schemaContextFactory,
- new NetconfStateSchemas.NetconfStateSchemasResolverImpl());
+ new NetconfStateSchemasResolverImpl());
}
/**