Fix NetconfNodeHandler interactions 81/107281/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 5 Aug 2023 23:08:28 +0000 (01:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 7 Aug 2023 08:50:32 +0000 (10:50 +0200)
commit7038ab8d71cb0aee7674380d986adc29de46e27c
tree42d3b56492f1cbc908866a00dc70ce65ac917682
parent044fe2ab870acc2faeb711157b44e618d2563f67
Fix NetconfNodeHandler interactions

There are a couple of failures in interacting with RemoteDeviceHandler
API (which is completely undocumented).

The API design (and interactions in implementations) assume that:
- onDeviceConnected()/onDeviceDisconnected() manage a reconnecting
  process -- i.e. when 'disconnected' it is assumed the device might
  come back again
- onDeviceFailed() is the hard alternative, indicating the node is node
  coming back

This is then picked up and routed through NetconfTopologyDeviceSalFacade
to NetconfDeviceTopologyAdapter, which makes assumptions and propagates
them to the datastore.

JIRA: NETCONF-1097
Change-Id: Ib148a617b52e775261212aa3a809d1ab450d7d13
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9db827875364d13611ad3b00f24e42ec259417f4)
apps/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/ConnectGivenUpException.java [new file with mode: 0644]
apps/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/NetconfNodeHandler.java
apps/netconf-topology/src/test/java/org/opendaylight/netconf/topology/spi/NetconfNodeHandlerTest.java