import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.optional.rev190614.netconf.node.fields.optional.topology.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.optional.rev190614.netconf.node.fields.optional.topology.NodeKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.optional.rev190614.netconf.node.fields.optional.topology.node.DatastoreLock;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus.ConnectionStatus;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.rfc8528.data.api.MountPointContext;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
@Override
- public synchronized void onDeviceConnected(final SchemaContext schemaContext,
+ public synchronized void onDeviceConnected(final MountPointContext mountContext,
final NetconfSessionPreferences netconfSessionPreferences,
final DOMRpcService deviceRpc, final DOMActionService deviceAction) {
-
+ final EffectiveModelContext schemaContext = mountContext.getEffectiveModelContext();
final NetconfDeviceDataBroker netconfDeviceDataBroker =
- new NetconfDeviceDataBroker(id, schemaContext, deviceRpc, netconfSessionPreferences);
+ new NetconfDeviceDataBroker(id, mountContext, deviceRpc, netconfSessionPreferences);
registerLockListener(netconfDeviceDataBroker);
final NetconfDeviceNotificationService notificationService = new NetconfDeviceNotificationService();
.updateDeviceData(true, netconfSessionPreferences.getNetconfDeviceCapabilities());
}
+ @Override
+ public synchronized void onDeviceReconnected(final NetconfSessionPreferences netconfSessionPreferences,
+ final NetconfNode node) {
+ this.salProvider.getTopologyDatastoreAdapter().updateDeviceData(ConnectionStatus.Connecting,
+ netconfSessionPreferences.getNetconfDeviceCapabilities(), LogicalDatastoreType.CONFIGURATION, node);
+ }
+
@Override
public synchronized void onDeviceDisconnected() {
salProvider.getTopologyDatastoreAdapter().updateDeviceData(false, new NetconfDeviceCapabilities());