Handle multiple rpc-error in the same rpc-reply 56/90256/1
authorJamo Luhrsen <jluhrsen@gmail.com>
Thu, 14 May 2020 21:12:58 +0000 (14:12 -0700)
committerTomas Cere <tomas.cere@pantheon.tech>
Thu, 4 Jun 2020 10:04:02 +0000 (10:04 +0000)
commit15ca5bd20ed49c90d882440b6da9adf4e408606d
tree8d2e44bc976850e096485c7c1ca86b898fefc9a7
parent00eefd0b46d75a96524a68aa68021f5149fb16e7
Handle multiple rpc-error in the same rpc-reply

When multiple rpc-error is seen in a reply it was not being
caught as an error and eventually falling through the cracks
to show up as an IllegalArgumentException.

This also adds a hack/workaround for passing back all the
error messages found from each of the multiple rpc-error(s)

Also, instead of this case not being recognized as an
rpc-error, it was causing the request to wait until
the device request timeout to expire at which point it's
noted as a full RPC failure and the device is disconnected
and reconnected. Now it is recognized as an error and the
response is handled as soon as it's received and there is
no connection flap.

JIRA: NETCONF-666
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I71829e04d7642cfd4d1c54596f1fc7670db0d292
(cherry picked from commit 8b2fc27e338bdd9cea9674204c1ec3d40a0c68c4)
netconf/netconf-api/src/main/java/org/opendaylight/netconf/api/DocumentedException.java
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/messages/NetconfMessageUtil.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/tx/AbstractWriteTx.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/listener/NetconfDeviceCommunicatorTest.java