Search in sources :

Example 1 with NetconfDeviceNotificationService

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);
}
Also used : AbstractNetconfDataTreeService(org.opendaylight.netconf.sal.connect.netconf.sal.AbstractNetconfDataTreeService) NetconfDataTreeService(org.opendaylight.netconf.dom.api.NetconfDataTreeService) NetconfDeviceNotificationService(org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceNotificationService)

Example 2 with NetconfDeviceNotificationService

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);
}
Also used : NetconfDataTreeService(org.opendaylight.netconf.dom.api.NetconfDataTreeService) NetconfDeviceNotificationService(org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceNotificationService)

Aggregations

NetconfDataTreeService (org.opendaylight.netconf.dom.api.NetconfDataTreeService)2 NetconfDeviceNotificationService (org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceNotificationService)2 AbstractNetconfDataTreeService (org.opendaylight.netconf.sal.connect.netconf.sal.AbstractNetconfDataTreeService)1