import akka.actor.ActorRef;
import akka.actor.ActorSystem;
+import akka.util.Timeout;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
import org.opendaylight.controller.sal.core.api.Broker;
import org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceNotificationService;
import org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceSalProvider;
import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
-import org.opendaylight.netconf.topology.singleton.api.NetconfDOMTransaction;
-import org.opendaylight.netconf.topology.singleton.impl.tx.NetconfProxyDOMTransaction;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final NetconfDeviceSalProvider salProvider;
private final ActorSystem actorSystem;
+ private final Timeout actorResponseWaitTime;
public SlaveSalFacade(final RemoteDeviceId id,
final Broker domBroker,
- final ActorSystem actorSystem) {
+ final ActorSystem actorSystem,
+ final Timeout actorResponseWaitTime) {
this.id = id;
this.salProvider = new NetconfDeviceSalProvider(id);
this.actorSystem = actorSystem;
+ this.actorResponseWaitTime = actorResponseWaitTime;
registerToSal(domBroker);
}
final ActorRef masterActorRef) {
final NetconfDeviceNotificationService notificationService = new NetconfDeviceNotificationService();
- final NetconfDOMTransaction proxyDOMTransactions =
- new NetconfProxyDOMTransaction(id, actorSystem, masterActorRef);
-
- final NetconfDOMDataBroker netconfDeviceDataBroker =
- new NetconfDOMDataBroker(actorSystem, id, proxyDOMTransactions);
+ final ProxyDOMDataBroker netconfDeviceDataBroker =
+ new ProxyDOMDataBroker(actorSystem, id, masterActorRef, actorResponseWaitTime);
salProvider.getMountInstance().onTopologyDeviceConnected(remoteSchemaContext, netconfDeviceDataBroker,
deviceRpc, notificationService);
unregisterSlaveMountPoint();
try {
salProvider.getMountInstance().close();
- } catch (Exception exception) {
+ } catch (final Exception exception) {
LOG.warn("{}: Exception in closing slave sal facade: {}", id, exception);
}