Fix periodic NETCONF Call Home connection dropping 33/100133/37
authorivan.martiniak <ivan.martiniak@pantheon.tech>
Tue, 28 Jun 2022 05:00:58 +0000 (07:00 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 25 Aug 2022 09:54:12 +0000 (11:54 +0200)
commit31560e352e65522fdbc64c2f863f90628d6ef772
tree8b229b795f15eeca1814d189146c64301959bc8d
parent0d0781f97cf2cf9b7957c878ca93e94c7fbe82ec
Fix periodic NETCONF Call Home connection dropping

Callhome devices make reconnection every hour due to key re-exchange,
which is part of SSHD implementation.

When a specific session is authenticated and activated,
in case of key re-exchange, authentication (invoking of doAuth() method)
does not need to be made again.

While we are at it, also make sure CallHomeSessionContext's constructor
does not have side-effects -- while this cannot quite happen since we do
not reuse ClientSessions, it is a needless leak.

JIRA: NETCONF-681
Change-Id: I824c92d230c7570570d5eed21d489c435bdc8b22
Signed-off-by: Ivan Martiniak <ivan.martiniak@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/callhome-protocol/src/main/java/org/opendaylight/netconf/callhome/protocol/CallHomeSessionContext.java
netconf/callhome-protocol/src/main/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServer.java
netconf/callhome-protocol/src/test/java/org/opendaylight/netconf/callhome/protocol/CallHomeSessionContextTest.java
netconf/callhome-protocol/src/test/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerTest.java