Handle multiple rpc-error in the same rpc-reply 59/89859/6
authorJamo Luhrsen <jluhrsen@gmail.com>
Thu, 14 May 2020 21:12:58 +0000 (14:12 -0700)
committerJamo Luhrsen <jluhrsen@gmail.com>
Wed, 3 Jun 2020 17:00:39 +0000 (17:00 +0000)
commit8b2fc27e338bdd9cea9674204c1ec3d40a0c68c4
tree7573c71d9d9be987cb7ff1758d4df9791400c51e
parent67457dd32b6b2649884e1d411c2fbe5bc72e632c
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
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