import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import javax.annotation.Nonnull;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService;
import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
private final ServiceGroupIdentifier serviceGroupIdent;
private final Timeout actorResponseWaitTime;
+ private final DOMMountPointService mountService;
+
private NetconfTopologySetup netconfTopologyDeviceSetup;
private RemoteDeviceId remoteDeviceId;
private RemoteDeviceConnector remoteDeviceConnector;
private NetconfNodeManager netconfNodeManager;
+ private ActorRef masterActorRef;
private boolean finalClose = false;
private boolean closed = false;
private boolean isMaster;
- private ActorRef masterActorRef;
-
NetconfTopologyContext(final NetconfTopologySetup netconfTopologyDeviceSetup,
final ServiceGroupIdentifier serviceGroupIdent,
- final Timeout actorResponseWaitTime) {
+ final Timeout actorResponseWaitTime, final DOMMountPointService mountService) {
this.netconfTopologyDeviceSetup = Preconditions.checkNotNull(netconfTopologyDeviceSetup);
this.serviceGroupIdent = serviceGroupIdent;
this.actorResponseWaitTime = actorResponseWaitTime;
+ this.mountService = mountService;
remoteDeviceId = NetconfTopologyUtils.createRemoteDeviceId(netconfTopologyDeviceSetup.getNode().getNodeId(),
netconfTopologyDeviceSetup.getNode().getAugmentation(NetconfNode.class));
remoteDeviceConnector = new RemoteDeviceConnectorImpl(netconfTopologyDeviceSetup, remoteDeviceId,
- actorResponseWaitTime);
+ actorResponseWaitTime, mountService);
netconfNodeManager = createNodeDeviceManager();
}
final String masterAddress = Cluster.get(netconfTopologyDeviceSetup.getActorSystem()).selfAddress().toString();
masterActorRef = netconfTopologyDeviceSetup.getActorSystem().actorOf(NetconfNodeActor.props(
netconfTopologyDeviceSetup, remoteDeviceId, DEFAULT_SCHEMA_REPOSITORY, DEFAULT_SCHEMA_REPOSITORY,
- actorResponseWaitTime),
+ actorResponseWaitTime, mountService),
NetconfTopologyUtils.createMasterActorName(remoteDeviceId.getName(), masterAddress));
remoteDeviceConnector.startRemoteDeviceConnection(masterActorRef);
private NetconfNodeManager createNodeDeviceManager() {
final NetconfNodeManager ndm =
- new NetconfNodeManager(netconfTopologyDeviceSetup, remoteDeviceId, actorResponseWaitTime);
+ new NetconfNodeManager(netconfTopologyDeviceSetup, remoteDeviceId, actorResponseWaitTime, mountService);
ndm.registerDataTreeChangeListener(netconfTopologyDeviceSetup.getTopologyId(),
netconfTopologyDeviceSetup.getNode().getKey());
if (!isMaster) {
netconfNodeManager.refreshDevice(netconfTopologyDeviceSetup, remoteDeviceId);
}
- remoteDeviceConnector = new RemoteDeviceConnectorImpl(netconfTopologyDeviceSetup, remoteDeviceId, actorResponseWaitTime);
+ remoteDeviceConnector = new RemoteDeviceConnectorImpl(netconfTopologyDeviceSetup, remoteDeviceId,
+ actorResponseWaitTime, mountService);
if (isMaster) {
final Future<Object> future = Patterns.ask(masterActorRef, new RefreshSetupMasterActorData(