a8743ec56dbcbe37123e57732197cc48f531fbaf
[netconf.git] / opendaylight / netconf / netconf-topology / src / main / java / org / opendaylight / netconf / topology / NetconfTopology.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.netconf.topology;
10
11 import akka.actor.ActorContext;
12 import akka.actor.ActorRef;
13 import com.google.common.util.concurrent.ListenableFuture;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.netconf.sal.connect.api.RemoteDeviceHandler;
16 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCapabilities;
17 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfSessionPreferences;
18 import org.opendaylight.netconf.topology.pipeline.TopologyMountPointFacade.ConnectionStatusListenerRegistration;
19 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
20 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
21
22 // TODO maybe rename to NetconfTopologyDispatcher?
23 public interface NetconfTopology {
24
25     String getTopologyId();
26
27     DataBroker getDataBroker();
28
29     ListenableFuture<NetconfDeviceCapabilities> connectNode(NodeId nodeId, Node configNode);
30
31     ListenableFuture<Void> disconnectNode(NodeId nodeId);
32
33     /**
34      * register master mount point
35      * @param context
36      * @param nodeId
37      */
38     void registerMountPoint(ActorContext context, NodeId nodeId);
39
40     /**
41      * register slave mountpoint with the provided ActorRef
42      * @param context
43      * @param nodeId
44      * @param masterRef
45      */
46     void registerMountPoint(ActorContext context, NodeId nodeId, ActorRef masterRef);
47
48     void unregisterMountPoint(NodeId nodeId);
49
50     ConnectionStatusListenerRegistration registerConnectionStatusListener(NodeId node, RemoteDeviceHandler<NetconfSessionPreferences> listener);
51 }