use of org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode in project lispflowmapping by opendaylight.
the class VppNetconfConnectionProbe method onDataTreeChanged.
@Override
public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) {
changes.forEach(modification -> {
final DataObjectModification<Node> rootNode = modification.getRootNode();
final Node node = rootNode.getDataAfter();
final NetconfNode netconfNode = getNodeAugmentation(node);
if (node == null || node.getNodeId() == null) {
return;
}
if (netconfNode == null || netconfNode.getConnectionStatus() == null) {
connectionStatusFuture.set(false);
unregister();
} else {
final NetconfNodeConnectionStatus.ConnectionStatus status = netconfNode.getConnectionStatus();
if (status.equals(Connected)) {
connectionStatusFuture.set(true);
unregister();
} else if (!status.equals(Connecting)) {
connectionStatusFuture.set(false);
unregister();
}
}
});
}
Aggregations