import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.available.capabilities.AvailableCapabilityBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.unavailable.capabilities.UnavailableCapability;
+import org.opendaylight.yangtools.rcf8528.data.util.EmptyMountPointContext;
+import org.opendaylight.yangtools.rfc8528.data.api.MountPointContext;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.repo.api.MissingSchemaSourceException;
final BaseSchema baseSchema = resolveBaseSchema(notificationSupport);
return new NetconfDeviceRpc(baseSchema.getSchemaContext(), listener,
- new NetconfMessageTransformer(baseSchema.getSchemaContext(), false, baseSchema));
+ new NetconfMessageTransformer(baseSchema.getMountPointContext(), false, baseSchema));
}
private static BaseSchema resolveBaseSchema(final boolean notificationSupport) {
return remoteSessionCapabilities.isNotificationsSupported() && reconnectOnSchemasChange;
}
- private synchronized void handleSalInitializationSuccess(final SchemaContext result,
+ private synchronized void handleSalInitializationSuccess(final MountPointContext result,
final NetconfSessionPreferences remoteSessionCapabilities,
final DOMRpcService deviceRpc,
final RemoteDeviceCommunicator<NetconfMessage> listener) {
// salFacade.onDeviceConnected has to be called before the notification handler is initialized
this.salFacade.onDeviceConnected(result, remoteSessionCapabilities, deviceRpc,
this.deviceActionFactory == null ? null : this.deviceActionFactory.createDeviceAction(
- this.messageTransformer, listener, result));
+ this.messageTransformer, listener, result.getSchemaContext()));
this.notificationHandler.onRemoteSchemaUp(this.messageTransformer);
LOG.info("{}: Netconf connector initialized successfully", id);
remoteSessionCapabilities.getNonModuleBasedCapsOrigin().get(entry)).build())
.collect(Collectors.toList()));
- handleSalInitializationSuccess(result, remoteSessionCapabilities, getDeviceSpecificRpc(result),
- listener);
+ final MountPointContext mountContext = new EmptyMountPointContext(result);
+ handleSalInitializationSuccess(mountContext, remoteSessionCapabilities,
+ getDeviceSpecificRpc(mountContext), listener);
return;
} catch (final ExecutionException e) {
// schemaBuilderFuture.checkedGet() throws only SchemaResolutionException
return resolutionException.getResolvedSources();
}
- protected NetconfDeviceRpc getDeviceSpecificRpc(final SchemaContext result) {
- return new NetconfDeviceRpc(result, listener, new NetconfMessageTransformer(result, true));
+ protected NetconfDeviceRpc getDeviceSpecificRpc(final MountPointContext result) {
+ return new NetconfDeviceRpc(result.getSchemaContext(), listener,
+ new NetconfMessageTransformer(result, true));
}
private Collection<SourceIdentifier> stripUnavailableSource(final Collection<SourceIdentifier> requiredSources,