mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 12:16:13 +02:00
[ONOS-8152] Adding new event in NetconfDeviceListener for netconf connection re-establishment after idle-timeout/session close received from device
Change-Id: I13f9ba181a0512b7496b76c04df67d38a9cea7df
This commit is contained in:
parent
909b958bff
commit
dbffc043a6
@ -37,4 +37,12 @@ public interface NetconfDeviceListener {
|
||||
*/
|
||||
|
||||
void deviceRemoved(DeviceId deviceId);
|
||||
|
||||
/**
|
||||
* Notifies that netconf connection with device is reestablished.
|
||||
*
|
||||
* @param deviceId the device with which netconf connection is reestablished
|
||||
*/
|
||||
default void netconfConnectionReestablished(DeviceId deviceId) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -815,6 +815,9 @@ public class NetconfControllerImpl implements NetconfController {
|
||||
if (device != null) {
|
||||
device.getSession().checkAndReestablish();
|
||||
log.info("Connection with device {} was reestablished", did);
|
||||
for (NetconfDeviceListener l : netconfDeviceListeners) {
|
||||
l.netconfConnectionReestablished(did);
|
||||
}
|
||||
} else {
|
||||
log.warn("The device {} is not in the system", did);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user