use of org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceNotificationService in project netconf by opendaylight.
the class MasterSalFacade method registerMasterMountPoint.
private void registerMasterMountPoint() {
requireNonNull(id);
requireNonNull(currentMountContext, "Device has no remote schema context yet. Probably not fully connected.");
requireNonNull(netconfSessionPreferences, "Device has no capabilities yet. Probably not fully connected.");
final NetconfDeviceNotificationService notificationService = new NetconfDeviceNotificationService();
deviceDataBroker = newDeviceDataBroker();
netconfService = newNetconfDataTreeService();
// We need to create ProxyDOMDataBroker so accessing mountpoint
// on leader node would be same as on follower node
final ProxyDOMDataBroker proxyDataBroker = new ProxyDOMDataBroker(id, masterActorRef, actorSystem.dispatcher(), actorResponseWaitTime);
final NetconfDataTreeService proxyNetconfService = new ProxyNetconfDataTreeService(id, masterActorRef, actorSystem.dispatcher(), actorResponseWaitTime);
salProvider.getMountInstance().onTopologyDeviceConnected(currentMountContext.getEffectiveModelContext(), proxyDataBroker, proxyNetconfService, deviceRpc, notificationService, deviceAction);
}
use of org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceNotificationService in project netconf by opendaylight.
the class SlaveSalFacade method registerSlaveMountPoint.
public void registerSlaveMountPoint(final EffectiveModelContext remoteSchemaContext, final DOMRpcService deviceRpc, final DOMActionService deviceAction, final ActorRef masterActorRef) {
if (!registered.compareAndSet(false, true)) {
return;
}
final NetconfDeviceNotificationService notificationService = new NetconfDeviceNotificationService();
final ProxyDOMDataBroker netconfDeviceDataBroker = new ProxyDOMDataBroker(id, masterActorRef, actorSystem.dispatcher(), actorResponseWaitTime);
final NetconfDataTreeService proxyNetconfService = new ProxyNetconfDataTreeService(id, masterActorRef, actorSystem.dispatcher(), actorResponseWaitTime);
salProvider.getMountInstance().onTopologyDeviceConnected(remoteSchemaContext, netconfDeviceDataBroker, proxyNetconfService, deviceRpc, notificationService, deviceAction);
LOG.info("{}: Slave mount point registered.", id);
}
Aggregations